Skip to content

Commit

Permalink
Simplify print_error()
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Dec 31, 2018
1 parent f9d5927 commit 96c3ce7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sherlock.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ def write_to_file(url, fname):


def print_error(err, errstr, var, debug=False):
if debug:
print(f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {err}")
else:
print(f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {var}")
err_or_var = err if debug else var
print(f"\033[37;1m[\033[91;1m-\033[37;1m]\033[91;1m {errstr}\033[93;1m {err_or_var}")


def get_response(request_future, error_type, social_network, verbose=False):
Expand Down

0 comments on commit 96c3ce7

Please sign in to comment.