Skip to content
Myr

shorten filename by os.path.basename in guess_filename(obj)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christopher Bare · committed by Christopher Bare · parent 207a274 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:requests/utils.py+1 added-1 removed
87 unmodified lines
88def guess_filename(obj):89 """Tries to guess the filename of the given object."""90 name = getattr(obj, 'name', None)91 if name and name[0] != '<' and name[-1] != '>':92 return name92 return os.path.basename(name)939495def from_key_val_list(value):96 """Take an object and test to see if it can be represented as a
486 unmodified lines