Commit c17d8caefcdf998d1fc7f99d4ad8f14b7eeec0ac
1 parent
e1934789
pylint-ify 4: remove other unused variables
Showing
1 changed file
with
4 additions
and
4 deletions
oletools/olevba.py
| ... | ... | @@ -1097,7 +1097,7 @@ def decompress_stream(compressed_container): |
| 1097 | 1097 | copy_token = \ |
| 1098 | 1098 | struct.unpack("<H", compressed_container[compressed_current:compressed_current + 2])[0] |
| 1099 | 1099 | #TODO: check this |
| 1100 | - length_mask, offset_mask, bit_count, maximum_length = copytoken_help( | |
| 1100 | + length_mask, offset_mask, bit_count, _ = copytoken_help( | |
| 1101 | 1101 | len(decompressed_container), decompressed_chunk_start) |
| 1102 | 1102 | length = (copy_token & length_mask) + 3 |
| 1103 | 1103 | temp1 = copy_token & offset_mask |
| ... | ... | @@ -1430,7 +1430,7 @@ def _extract_vba(ole, vba_root, project_path, dir_path): |
| 1430 | 1430 | unused = projectmodules_projectcookierecord_cookie |
| 1431 | 1431 | |
| 1432 | 1432 | log.debug("parsing {0} modules".format(projectmodules_count)) |
| 1433 | - for x in xrange(0, projectmodules_count): | |
| 1433 | + for _ in xrange(0, projectmodules_count): | |
| 1434 | 1434 | modulename_id = struct.unpack("<H", dir_stream.read(2))[0] |
| 1435 | 1435 | check_value('MODULENAME_Id', 0x0019, modulename_id) |
| 1436 | 1436 | modulename_sizeof_modulename = struct.unpack("<L", dir_stream.read(4))[0] |
| ... | ... | @@ -2432,10 +2432,10 @@ class VBA_Parser(object): |
| 2432 | 2432 | # variable to merge source code from all modules: |
| 2433 | 2433 | if self.vba_code_all_modules is None: |
| 2434 | 2434 | self.vba_code_all_modules = '' |
| 2435 | - for (subfilename, stream_path, vba_filename, vba_code) in self.extract_all_macros(): | |
| 2435 | + for (_, _, _, vba_code) in self.extract_all_macros(): | |
| 2436 | 2436 | #TODO: filter code? (each module) |
| 2437 | 2437 | self.vba_code_all_modules += vba_code + '\n' |
| 2438 | - for (subfilename, form_path, form_string) in self.extract_form_strings(): | |
| 2438 | + for (_, _, form_string) in self.extract_form_strings(): | |
| 2439 | 2439 | self.vba_code_all_modules += form_string + '\n' |
| 2440 | 2440 | # Analyze the whole code at once: |
| 2441 | 2441 | scanner = VBA_Scanner(self.vba_code_all_modules) | ... | ... |