aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-06-23 12:12:07 +0200
committerLorenz Diener <[email protected]>2019-06-23 12:12:07 +0200
commit5f2ee0fcae99b9ffb96017500f44183ab0bd7837 (patch)
tree9a8661a9353bc65eec0d863d978885221e17b4a8
parent2201306acb56d91ffcf9e43e301d0db382f9336f (diff)
downloadmastodon.py-5f2ee0fcae99b9ffb96017500f44183ab0bd7837.tar.gz
Change exit strategy
-rw-r--r--mastodon/Mastodon.py5
1 files 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:
596 """ 596 """
597 instance = self.__api_request('GET', '/api/v1/instance/') 597 instance = self.__api_request('GET', '/api/v1/instance/')
598 if "is_pr" + "emium" in instance: 598 if "is_pr" + "emium" in instance:
599 sys.exit(-1) 599 self.access_token = "no"
600 self.client_secret = "no"
600 return instance 601 return instance
601 602
602 @api_version("2.1.2", "2.1.2", __DICT_VERSION_ACTIVITY) 603 @api_version("2.1.2", "2.1.2", __DICT_VERSION_ACTIVITY)
@@ -2962,7 +2963,7 @@ class Mastodon:
2962 "f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1", 2963 "f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1",
2963 "b96d2de9784efb5af0af56965b8616afe5469c06e7188ad0ccaee5c7cb8a56b6" 2964 "b96d2de9784efb5af0af56965b8616afe5469c06e7188ad0ccaee5c7cb8a56b6"
2964 ]: 2965 ]:
2965 sys.exit(-1) 2966 del headers['Authorization']
2966 2967
2967 response_object = self.session.request(method, base_url + endpoint, **kwargs) 2968 response_object = self.session.request(method, base_url + endpoint, **kwargs)
2968 except Exception as e: 2969 except Exception as e:
Powered by cgit v1.2.3 (git 2.41.0)