server: Don't use a keyword for the path argument to getsize
authorW. Trevor King <wking@tremily.us>
Thu, 20 Feb 2014 19:14:54 +0000 (11:14 -0800)
committerW. 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

index 5853f14b9f899b046a830837b4a05a6f0918b71a..3f876e9e3ac3f1ad9db24c552773eebf70bd9cf1 100644 (file)
@@ -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