Skip to content

Commit

Permalink
Do not require Content-Type header to be present in all responses (#54)
Browse files Browse the repository at this point in the history
Related: #53
  • Loading branch information
raghavkarol authored Jul 1, 2021
1 parent 039df03 commit 2b8bdcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alcli/alertlogic_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def __call__(self, args, parsed_globals):
# Remove optional arguments that haven't been supplied
op_args = {k:self._encode(operation, k, v) for (k,v) in kwargs.items() if v is not None}
res = operation(**op_args)
if res.headers['content-type'] == 'text/plain':
if res.headers.get('content-type') == 'text/plain':
print(res.text)
else:
try:
Expand Down

0 comments on commit 2b8bdcb

Please sign in to comment.