forked from platformio/platformio-core
Fix "Unnecessary "else/elif" after "raise"" by PyLint
This commit is contained in:
1 parent
5a72e3f2a1
commit
237d55208c
4 files changed
+5
-9
No files matched your search
+2
-3
@@ -643,10 +643,9 @@ def _get_api_result(
|
||||
except requests.exceptions.HTTPError as e:
|
||||
if result and "message" in result:
|
||||
raise exception.APIRequestError(result['message'])
|
||||
elif result and "errors" in result:
|
||||
if result and "errors" in result:
|
||||
raise exception.APIRequestError(result['errors'][0]['title'])
|
||||
else:
|
||||
raise exception.APIRequestError(e)
|
||||
raise exception.APIRequestError(e)
|
||||
except ValueError:
|
||||
raise exception.APIRequestError(
|
||||
"Invalid response: %s" % r.text.encode("utf-8"))
|
||||
|
||||
Reference in new issue
Block a user