Fix #4971 (Problems with converting Palm PDB-PDF files to other formats/show in calibre-viewer)

This commit is contained in:
Kovid Goyal 2010-03-03 01:24:56 -07:00
commit 80cbfb1e41

View File

@ -27,7 +27,7 @@ class Reader(FormatReader):
self.log.info('Extracting PDF...') self.log.info('Extracting PDF...')
with TemporaryFile() as pdf_n: with TemporaryFile() as pdf_n:
pdf = open(pdf_n, 'rw+b') pdf = open(pdf_n, 'rwb')
for x in xrange(self.header.section_count()): for x in xrange(self.header.section_count()):
pdf.write(self.header.section_data(x)) pdf.write(self.header.section_data(x))