Advertisement
PypeBros

bugfix in calibre's "oeb/base.py"

Jan 5th, 2013
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. def read(self, path):
  2.         if path is None:
  3.             path = self.opfname
  4.         path = os.path.join(self.rootdir, path)
  5.         try:
  6.             with open(urlunquote(path), 'rb') as f:
  7.                 return f.read()
  8.         except:
  9.             with open(path,'rb') as f:
  10.                 return f.read()
  11.             # Pype: how about files that really hold %2f in their name?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement