1
0

do not raise BaseException

This commit is contained in:
SomberNight
2018-04-07 17:10:30 +02:00
parent 76e67daadd
commit 7b50790584
21 changed files with 53 additions and 53 deletions

View File

@@ -72,10 +72,10 @@ class LabelsPlugin(BasePlugin):
kwargs['headers']['Content-Type'] = 'application/json'
response = requests.request(method, url, **kwargs)
if response.status_code != 200:
raise BaseException(response.status_code, response.text)
raise Exception(response.status_code, response.text)
response = response.json()
if "error" in response:
raise BaseException(response["error"])
raise Exception(response["error"])
return response
def do_request_safe(self, *args, **kwargs):