Commit 80804e865c65a4bc7d82f5bbbe4cf92e012e6270

Authored by Christian Herdtweck
1 parent fdf415c7

removed test code (was only there for debugging and development)

Showing 1 changed file with 1 additions and 41 deletions
oletools/ppt_parser.py
... ... @@ -1568,46 +1568,6 @@ def iterative_decompress(stream, size, chunk_size=4096):
1568 1568  
1569 1569 return decomp, n_read, return_err
1570 1570  
1571   -# === TESTING =================================================================
1572   -
1573   -def test():
1574   - """ for testing and debugging """
1575   -
1576   - from glob import glob
1577   - from olevba import VBA_Parser
1578   -
1579   - # setup logging
1580   - logging.basicConfig(level=logging.DEBUG,
1581   - format='%(levelname)-8s %(name)s: %(message)s')
1582   - log.setLevel(logging.NOTSET)
1583   -
1584   - test_files = ['gelaber_autostart.ppt', ]
1585   - #test_files = glob('*.ppt')
1586   - for file_name in test_files:
1587   - # parse
1588   - log.info('-' * 72)
1589   - log.info('test file: {}'.format(file_name))
1590   - try:
1591   - ppt = PptParser(file_name, fast_fail=False)
1592   - #ppt.parse_document_persist_object()
1593   -
1594   - for vba_data in ppt.iter_vba_data():
1595   - parser = VBA_Parser(None, vba_data, container='PptParser')
1596   - for vba_root, project_path, dir_path in \
1597   - parser.find_vba_projects():
1598   - log.info('found vba project: root={}, proj={}, dir={}'
1599   - .format(vba_root, project_path, dir_path))
1600   - for subfilename, stream_path, vba_filename, vba_code in \
1601   - parser.extract_all_macros():
1602   - log.info('found macro: subfile={}, stream={}, vbafile={}'
1603   - .format(subfilename, stream_path, vba_filename))
1604   - for line in vba_code.splitlines():
1605   - log.info('code: {}'.format(line.rstrip()))
1606   -
1607   -
1608   - except Exception:
1609   - log.exception('exception')
1610   -
1611 1571  
1612 1572 if __name__ == '__main__':
1613   - test()
  1573 + print 'nothing here to run!'
... ...