Upgraded requests to 2.5.1

This commit is contained in:
Bas Stottelaar
2015-01-27 21:55:49 +01:00
parent a5225dfc2e
commit f6b5c0190d
5 changed files with 16 additions and 13 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ def get_netrc_auth(url):
def guess_filename(obj):
"""Tries to guess the filename of the given object."""
name = getattr(obj, 'name', None)
if name and name[0] != '<' and name[-1] != '>':
if name and isinstance(name, builtin_str) and name[0] != '<' and name[-1] != '>':
return os.path.basename(name)