Commit abf8aeeb61aae9edd08da14af9a912e6e3582542
1 parent
c17d8cae
pylint-ify 5: remove unnecessary pass and global
Showing
1 changed file
with
0 additions
and
7 deletions
oletools/olevba.py
| ... | ... | @@ -1703,7 +1703,6 @@ def detect_base64_strings(vba_code): |
| 1703 | 1703 | except (TypeError, ValueError) as exc: |
| 1704 | 1704 | log.debug('Failed to base64-decode (%s)' % exc) |
| 1705 | 1705 | # if an exception occurs, it is likely not a base64-encoded string |
| 1706 | - pass | |
| 1707 | 1706 | return results |
| 1708 | 1707 | |
| 1709 | 1708 | |
| ... | ... | @@ -1731,7 +1730,6 @@ def detect_dridex_strings(vba_code): |
| 1731 | 1730 | except Exception as exc: |
| 1732 | 1731 | log.debug('Failed to Dridex-decode (%s)' % exc) |
| 1733 | 1732 | # if an exception occurs, it is likely not a dridex-encoded string |
| 1734 | - pass | |
| 1735 | 1733 | return results |
| 1736 | 1734 | |
| 1737 | 1735 | |
| ... | ... | @@ -2101,7 +2099,6 @@ class VBA_Parser(object): |
| 2101 | 2099 | except (IOError, TypeError, ValueError): |
| 2102 | 2100 | # TODO: handle OLE parsing exceptions |
| 2103 | 2101 | log.exception('Failed OLE parsing for file %r' % self.filename) |
| 2104 | - pass | |
| 2105 | 2102 | |
| 2106 | 2103 | |
| 2107 | 2104 | def open_openxml(self, _file): |
| ... | ... | @@ -2137,7 +2134,6 @@ class VBA_Parser(object): |
| 2137 | 2134 | # TODO: handle parsing exceptions |
| 2138 | 2135 | log.exception('Failed Zip/OpenXML parsing for file %r (%s)' |
| 2139 | 2136 | % (self.filename, exc)) |
| 2140 | - pass | |
| 2141 | 2137 | |
| 2142 | 2138 | def open_word2003xml(self, data): |
| 2143 | 2139 | """ |
| ... | ... | @@ -2177,7 +2173,6 @@ class VBA_Parser(object): |
| 2177 | 2173 | # TODO: differentiate exceptions for each parsing stage |
| 2178 | 2174 | # (but ET is different libs, no good exception description in API) |
| 2179 | 2175 | log.exception('Failed XML parsing for file %r (%s)' % (self.filename, exc)) |
| 2180 | - pass | |
| 2181 | 2176 | |
| 2182 | 2177 | def open_mht(self, data): |
| 2183 | 2178 | """ |
| ... | ... | @@ -2239,7 +2234,6 @@ class VBA_Parser(object): |
| 2239 | 2234 | except Exception: |
| 2240 | 2235 | log.exception('Failed MIME parsing for file %r - %s' |
| 2241 | 2236 | % (self.filename, MSG_OLEVBA_ISSUES)) |
| 2242 | - pass | |
| 2243 | 2237 | |
| 2244 | 2238 | |
| 2245 | 2239 | def open_text(self, data): |
| ... | ... | @@ -2844,7 +2838,6 @@ def main(): |
| 2844 | 2838 | """ |
| 2845 | 2839 | Main function, called when olevba is run from the command line |
| 2846 | 2840 | """ |
| 2847 | - global log | |
| 2848 | 2841 | DEFAULT_LOG_LEVEL = "warning" # Default log level |
| 2849 | 2842 | LOG_LEVELS = { |
| 2850 | 2843 | 'debug': logging.DEBUG, | ... | ... |