diff --git a/bring2lite/classes/potentially_parser.py b/bring2lite/classes/potentially_parser.py index 7923cc0..74c3972 100644 --- a/bring2lite/classes/potentially_parser.py +++ b/bring2lite/classes/potentially_parser.py @@ -32,13 +32,12 @@ def parse_page(self, page, filename="", is_first_page=False, is_wal=False, is_tr self.start_of_cell_content_area = pageheader[3] - unalloc_content = None if self.is_trunk_page: unalloc_content = self._extract_trunk_page_content(page) else: unalloc_content = self._extract_unalloc_content(page, schema_offset) - if not unalloc_content: - return [] + if not unalloc_content: + return [] self.result = [] @@ -168,6 +167,8 @@ def _extract_trunk_page_content(self, page): break tmp_result = page[end_of_cell_pointer_array: self.page_size] + if not tmp_result: + return None start_of_content = 0 offset_tester = unpack('>B', tmp_result[start_of_content: start_of_content + 1])[0]