projects
/
package-cache.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c546a1d
)
server: Don't use a keyword for the path argument to getsize
author
W. Trevor King
<wking@tremily.us>
Thu, 20 Feb 2014 19:14:54 +0000
(11:14 -0800)
committer
W. Trevor King
<wking@tremily.us>
Thu, 20 Feb 2014 19:23:43 +0000
(11:23 -0800)
Despite being documented as path [1], using a keyword argument raises
a TypeError:
TypeError: getsize() got an unexpected keyword argument 'path'
[1]: http://docs.python.org/3/library/os.path.html#os.path.getsize
package_cache/server.py
patch
|
blob
|
history
diff --git
a/package_cache/server.py
b/package_cache/server.py
index 5853f14b9f899b046a830837b4a05a6f0918b71a..3f876e9e3ac3f1ad9db24c552773eebf70bd9cf1 100644
(file)
--- a/
package_cache/server.py
+++ b/
package_cache/server.py
@@
-66,7
+66,7
@@
class Server (object):
Content-Length:
https://tools.ietf.org/html/rfc2616#section-14.13
"""
- return str(_os.path.getsize(path
=path
))
+ return str(_os.path.getsize(path))
def _get_content_type(self, path):
"""Content-Type value per RFC 2616