This commit is contained in:
Kovid Goyal 2007-11-28 01:16:28 +00:00
parent 09a7feb08b
commit 6674582247

View File

@ -229,6 +229,16 @@ class PRS505(Device):
except DeviceError: except DeviceError:
time.sleep(3) time.sleep(3)
self.open_osx() self.open_osx()
if self._card_prefix is not None:
cachep = os.path.join(self._card_prefix, self.CACHE_XML)
if not os.path.exists(cachep):
os.makedirs(os.path.dirname(cachep), mode=0777)
f = open(cachep, 'wb')
f.write(u'''<?xml version="1.0" encoding="UTF-8"?>
<cache xmlns="http://www.kinoma.com/FskCache/1">
</cache>
'''.encode('utf8'))
f.close()
def set_progress_reporter(self, pr): def set_progress_reporter(self, pr):
self.report_progress = pr self.report_progress = pr