Remove text file related error messages
James Cameron authored 5 years ago
Rahul Bothra committed 5 years ago
103 | 103 | file_name = file_path.replace('file://', '') |
104 | 104 | mimetype = mime.get_for_file(file_path) |
105 | 105 | if mimetype == 'application/zip': |
106 | logging.error('opening zip file') | |
106 | logging.debug('opening zip file') | |
107 | 107 | self.zf = zipfile.ZipFile(file_path.replace('file://', ''), 'r') |
108 | 108 | self.book_files = self.zf.namelist() |
109 | 109 | extract_path = os.path.join(self._activity.get_activity_root(), |
113 | 113 | self.zf.extract(book_file, extract_path) |
114 | 114 | file_name = os.path.join(extract_path, book_file) |
115 | 115 | |
116 | logging.error('opening file_name %s' % file_name) | |
116 | logging.debug('opening file_name %s' % file_name) | |
117 | 117 | self._etext_file = open(file_name, 'r') |
118 | 118 | |
119 | 119 | self.page_index = [0] |
338 | 338 | self.metadata = activity.metadata |
339 | 339 | if 'Read_zoom' in self.metadata: |
340 | 340 | try: |
341 | logging.error('Loading zoom %s', self.metadata['Read_zoom']) | |
341 | logging.debug('Loading zoom %s', self.metadata['Read_zoom']) | |
342 | 342 | self.set_zoom(float(self.metadata['Read_zoom'])) |
343 | 343 | except: |
344 | 344 | pass |