Skip to content

Commit e8c02c3

Browse files
author
Will Trimble
committed
one more test for return type
1 parent 6cc775b commit e8c02c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mglib/mglib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def obj_from_url(url, auth=None, data=None, debug=False, method=None):
7878
except: # try one more time ConnectionResetError is incompatible with python2
7979
result = body_from_url(url, 'application/json', auth=auth, data=data, debug=debug, method=method)
8080
read = result.read()
81-
if result.headers["content-type"] == "application/x-download":
81+
if result.headers["content-type"] == "application/x-download" or result.headers["content-type"] == "application/octet-stream":
8282
return(read) # Watch out!
8383
if result.headers["content-type"][0:9] == "text/html": # json decoder won't work
8484
return(read) # Watch out!

0 commit comments

Comments
 (0)