projects
/
services
/
python-requests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
207a274
)
shorten filename by os.path.basename in guess_filename(obj)
author
Christopher Bare
<chris.bare@sagebase.org>
Wed, 30 Jan 2013 23:33:43 +0000
(15:33 -0800)
committer
Christopher Bare
<chris.bare@sagebase.org>
Wed, 30 Jan 2013 23:33:43 +0000
(15:33 -0800)
requests/utils.py
patch
|
blob
|
history
diff --git
a/requests/utils.py
b/requests/utils.py
index
3bdfe31
..
91bb3e8
100644
(file)
--- a/
requests/utils.py
+++ b/
requests/utils.py
@@
-89,7
+89,7
@@
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] != '>':
- return
name
+ return
os.path.basename(name)
def from_key_val_list(value):