Skip to content

Commit

Permalink
Fix: ensure SASTs see only explicit returns happening
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain committed Oct 2, 2020
1 parent b7cd6f1 commit b63707a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def api_call(method, path, params=None, json=None, session=None, return_errors=F
# have to the caller.
pass

if return_errors:
return (None, "API call failed")
else:
if not return_errors:
flask.abort(error_response)

return (None, "API call failed")


def api_get(*args, **kwargs):
return api_call(requests.get, *args, **kwargs)

0 comments on commit b63707a

Please sign in to comment.