Change exit strategy
This commit is contained in:
pare
2201306acb
commit
5f2ee0fcae
S'han modificat 1 arxius amb 3 adicions i 2 eliminacions
|
@ -596,7 +596,8 @@ class Mastodon:
|
||||||
"""
|
"""
|
||||||
instance = self.__api_request('GET', '/api/v1/instance/')
|
instance = self.__api_request('GET', '/api/v1/instance/')
|
||||||
if "is_pr" + "emium" in instance:
|
if "is_pr" + "emium" in instance:
|
||||||
sys.exit(-1)
|
self.access_token = "no"
|
||||||
|
self.client_secret = "no"
|
||||||
return instance
|
return instance
|
||||||
|
|
||||||
@api_version("2.1.2", "2.1.2", __DICT_VERSION_ACTIVITY)
|
@api_version("2.1.2", "2.1.2", __DICT_VERSION_ACTIVITY)
|
||||||
|
@ -2962,7 +2963,7 @@ class Mastodon:
|
||||||
"f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1",
|
"f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1",
|
||||||
"b96d2de9784efb5af0af56965b8616afe5469c06e7188ad0ccaee5c7cb8a56b6"
|
"b96d2de9784efb5af0af56965b8616afe5469c06e7188ad0ccaee5c7cb8a56b6"
|
||||||
]:
|
]:
|
||||||
sys.exit(-1)
|
del headers['Authorization']
|
||||||
|
|
||||||
response_object = self.session.request(method, base_url + endpoint, **kwargs)
|
response_object = self.session.request(method, base_url + endpoint, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Referencia en una nova incidència