Skip to content

Commit

Permalink
handle None response
Browse files Browse the repository at this point in the history
This happens if the connection times out
  • Loading branch information
snopoke committed Mar 5, 2021
1 parent b5f310c commit f98ce7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commcare_export/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def evaluate_query(env, query):
force_lazy_result(lazy_result)
return 0
except requests.exceptions.RequestException as e:
if e.response.status_code == 401:
if e.response and e.response.status_code == 401:
print("\nAuthentication failed. Please check your credentials.", file=sys.stderr)
return EXIT_STATUS_ERROR
else:
Expand Down

0 comments on commit f98ce7c

Please sign in to comment.