diff options
author | Helmut Grohne <helmut@subdivi.de> | 2012-07-01 11:30:22 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2012-07-01 11:30:22 +0200 |
commit | 85a4d0c404c767460887eafe5e7aa2511f70bad6 (patch) | |
tree | 7937538be0c9de4a0c667ef333d9c76cb840aa40 | |
parent | 3f2f7f72a73caf087066c75d2e2b6e5ed908d34d (diff) | |
download | wsgitools-85a4d0c404c767460887eafe5e7aa2511f70bad6.tar.gz |
make StaticFile work with py3k
There is no file builtin, and binary mode gives bytes instead of str.
-rw-r--r-- | wsgitools/applications.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wsgitools/applications.py b/wsgitools/applications.py index dfd8a2f..9c6dad8 100644 --- a/wsgitools/applications.py +++ b/wsgitools/applications.py @@ -112,7 +112,7 @@ class StaticFile: try: if isinstance(self.filelike, basestring): # raises IOError - stream = file(self.filelike) + stream = open(self.filelike, "rb") size = os.path.getsize(self.filelike) else: stream = self.filelike |