Codebase list sugar-read-activity / 31bea0a
Remove text file related error messages James Cameron authored 5 years ago Rahul Bothra committed 5 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
103103 file_name = file_path.replace('file://', '')
104104 mimetype = mime.get_for_file(file_path)
105105 if mimetype == 'application/zip':
106 logging.error('opening zip file')
106 logging.debug('opening zip file')
107107 self.zf = zipfile.ZipFile(file_path.replace('file://', ''), 'r')
108108 self.book_files = self.zf.namelist()
109109 extract_path = os.path.join(self._activity.get_activity_root(),
113113 self.zf.extract(book_file, extract_path)
114114 file_name = os.path.join(extract_path, book_file)
115115
116 logging.error('opening file_name %s' % file_name)
116 logging.debug('opening file_name %s' % file_name)
117117 self._etext_file = open(file_name, 'r')
118118
119119 self.page_index = [0]
338338 self.metadata = activity.metadata
339339 if 'Read_zoom' in self.metadata:
340340 try:
341 logging.error('Loading zoom %s', self.metadata['Read_zoom'])
341 logging.debug('Loading zoom %s', self.metadata['Read_zoom'])
342342 self.set_zoom(float(self.metadata['Read_zoom']))
343343 except:
344344 pass