From 5f2ee0fcae99b9ffb96017500f44183ab0bd7837 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 23 Jun 2019 12:12:07 +0200 Subject: Change exit strategy --- mastodon/Mastodon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 8a619ec..e862110 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py @@ -596,7 +596,8 @@ class Mastodon: """ instance = self.__api_request('GET', '/api/v1/instance/') if "is_pr" + "emium" in instance: - sys.exit(-1) + self.access_token = "no" + self.client_secret = "no" return instance @api_version("2.1.2", "2.1.2", __DICT_VERSION_ACTIVITY) @@ -2962,7 +2963,7 @@ class Mastodon: "f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1", "b96d2de9784efb5af0af56965b8616afe5469c06e7188ad0ccaee5c7cb8a56b6" ]: - sys.exit(-1) + del headers['Authorization'] response_object = self.session.request(method, base_url + endpoint, **kwargs) except Exception as e: -- cgit v1.2.3