Skip to content

Commit

Permalink
fix: error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Datalux committed Aug 26, 2020
1 parent 961e8b5 commit 85e390b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Osintgram.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,10 @@ def login(self, u, p):
on_login=lambda x: self.onlogin_callback(x, settings_file))

except ClientError as e:
print('ClientError {0!s} (Code: {1:d}, Response: {2!s})'.format(e.msg, e.code, e.error_response))
#pc.printout('ClientError {0!s} (Code: {1:d}, Response: {2!s})'.format(e.msg, e.code, e.error_response), pc.RED)
error = json.loads(e.error_response)
pc.printout(error['message'], pc.RED)
pc.printout("\n")
exit(9)

def to_json(self, python_object):
Expand Down

0 comments on commit 85e390b

Please sign in to comment.