Commit 1eaa36f1 by willmcgugan@gmail.com

Applied patch to zipfs

parent 63ae726c
...@@ -205,7 +205,8 @@ class ZipFS(FS): ...@@ -205,7 +205,8 @@ class ZipFS(FS):
msg="1 Zip file must be opened for reading ('r') or appending ('a')") msg="1 Zip file must be opened for reading ('r') or appending ('a')")
try: try:
if hasattr(self.zf, 'open') and self._zip_file_string: if hasattr(self.zf, 'open') and self._zip_file_string:
return self.zf.open(self._encode_path(path), "r") #return self.zf.open(self._encode_path(path), "r")
return self.zf.open(self._encode_path(path), 'rU' if 'U' in mode else 'r')
else: else:
contents = self.zf.read(self._encode_path(path)) contents = self.zf.read(self._encode_path(path))
except KeyError: except KeyError:
......
...@@ -52,7 +52,7 @@ setup(install_requires=['distribute', 'six'], ...@@ -52,7 +52,7 @@ setup(install_requires=['distribute', 'six'],
author_email="will@willmcgugan.com", author_email="will@willmcgugan.com",
#url="http://code.google.com/p/pyfilesystem/", #url="http://code.google.com/p/pyfilesystem/",
#download_url="http://code.google.com/p/pyfilesystem/downloads/list", #download_url="http://code.google.com/p/pyfilesystem/downloads/list",
url="http://pypi.python.org/pypi/fs/" url="http://pypi.python.org/pypi/fs/",
platforms=['any'], platforms=['any'],
packages=['fs', packages=['fs',
'fs.expose', 'fs.expose',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment