GwR patch for os.getcwdu() call

This commit is contained in:
GRiker 2010-11-07 05:08:02 -07:00
parent c243416d71
commit 62c4f18bf6

View File

@ -109,7 +109,10 @@ class OCFZipReader(OCFReader):
raise EPubException("not a ZIP .epub OCF container")
self.root = root
if self.root is None:
self.root = os.getcwdu()
try:
self.root = os.getcwdu()
except:
pass
if hasattr(stream, 'name'):
self.root = os.path.abspath(os.path.dirname(stream.name))
super(OCFZipReader, self).__init__()