Commit 939572f9d631ee4172c369b13cd345764439484e

Authored by Christian Herdtweck
Committed by Philippe Lagadec
1 parent 6b5caf53

xls_parser: minor changes (doc strings, pep8, pylint)

Showing 1 changed file with 5 additions and 5 deletions
oletools/xls_parser.py
@@ -62,7 +62,7 @@ _parent_dir = os.path.normpath(os.path.join(_thismodule_dir, '..')) @@ -62,7 +62,7 @@ _parent_dir = os.path.normpath(os.path.join(_thismodule_dir, '..'))
62 if _parent_dir not in sys.path: 62 if _parent_dir not in sys.path:
63 sys.path.insert(0, _parent_dir) 63 sys.path.insert(0, _parent_dir)
64 64
65 -from oletools.thirdparty import olefile # pylint: disable=wrong-import-position 65 +from oletools.thirdparty import olefile
66 66
67 67
68 ############################################################################### 68 ###############################################################################
@@ -141,8 +141,8 @@ class XlsFile(olefile.OleFileIO): @@ -141,8 +141,8 @@ class XlsFile(olefile.OleFileIO):
141 is_stream = direntry.entry_type == olefile.STGTY_STREAM 141 is_stream = direntry.entry_type == olefile.STGTY_STREAM
142 logging.debug('direntry {:2d} {}: {}'.format( 142 logging.debug('direntry {:2d} {}: {}'.format(
143 sid, '[orphan]' if is_orphan else direntry.name, 143 sid, '[orphan]' if is_orphan else direntry.name,
144 - 'is stream of size {}'.format(direntry.size) if is_stream else  
145 - 'no stream ({})'.format(ENTRY_TYPE2STR[direntry.entry_type]))) 144 + 'is stream of size {}'.format(direntry.size) if is_stream else
  145 + 'no stream ({})'.format(ENTRY_TYPE2STR[direntry.entry_type])))
146 if is_stream: 146 if is_stream:
147 if direntry.name == 'Workbook': 147 if direntry.name == 'Workbook':
148 clz = WorkbookStream 148 clz = WorkbookStream
@@ -443,9 +443,9 @@ class XlsRecordSupBook(XlsRecord): @@ -443,9 +443,9 @@ class XlsRecordSupBook(XlsRecord):
443 elif self.ctab == 0x1 and self.cch == 0x3A01: 443 elif self.ctab == 0x1 and self.cch == 0x3A01:
444 self.support_link_type = self.LINK_TYPE_ADDIN 444 self.support_link_type = self.LINK_TYPE_ADDIN
445 # next records must be ExternName with all add-in functions 445 # next records must be ExternName with all add-in functions
446 - elif self.virt_path == '\u0020': # space ; ctab can be anything 446 + elif self.virt_path == u'\u0020': # space ; ctab can be anything
447 self.support_link_type = self.LINK_TYPE_UNUSED 447 self.support_link_type = self.LINK_TYPE_UNUSED
448 - elif self.virt_path == '\u0000': 448 + elif self.virt_path == u'\u0000':
449 self.support_link_type = self.LINK_TYPE_SAMESHEET 449 self.support_link_type = self.LINK_TYPE_SAMESHEET
450 elif self.ctab == 0x0 and self.virt_path: 450 elif self.ctab == 0x0 and self.virt_path:
451 self.support_link_type = self.LINK_TYPE_OLE_DDE 451 self.support_link_type = self.LINK_TYPE_OLE_DDE