diff --git a/oletools/msodde.py b/oletools/msodde.py index 9520868..8bd7566 100644 --- a/oletools/msodde.py +++ b/oletools/msodde.py @@ -74,7 +74,7 @@ from oletools import xls_parser from oletools import rtfobj from oletools.ppt_record_parser import is_ppt from oletools import crypto -from oletools.common import ensure_stdout_handles_unicode +from oletools.common.io_encoding import ensure_stdout_handles_unicode from oletools.common.log_helper import log_helper # ----------------------------------------------------------------------------- diff --git a/oletools/olemeta.py b/oletools/olemeta.py index a759cb2..6131746 100644 --- a/oletools/olemeta.py +++ b/oletools/olemeta.py @@ -79,7 +79,7 @@ if not _parent_dir in sys.path: import olefile from oletools.thirdparty import xglob from oletools.thirdparty.tablestream import tablestream -from oletools.common import ensure_stdout_handles_unicode +from oletools.common.io_encoding import ensure_stdout_handles_unicode #=== MAIN ================================================================= diff --git a/oletools/oleobj.py b/oletools/oleobj.py index 0f03376..4fd15da 100644 --- a/oletools/oleobj.py +++ b/oletools/oleobj.py @@ -73,7 +73,7 @@ except ImportError: from oletools.ppt_record_parser import (is_ppt, PptFile, PptRecordExOleVbaActiveXAtom) from oletools.ooxml import XmlParser -from oletools.common import ensure_stdout_handles_unicode +from oletools.common.io_encoding import ensure_stdout_handles_unicode # ----------------------------------------------------------------------------- # CHANGELOG: diff --git a/oletools/olevba.py b/oletools/olevba.py index 40efd14..d00fe98 100644 --- a/oletools/olevba.py +++ b/oletools/olevba.py @@ -317,7 +317,7 @@ from oletools import ppt_parser from oletools import oleform from oletools import rtfobj from oletools import crypto -from oletools.common import ensure_stdout_handles_unicode +from oletools.common.io_encoding import ensure_stdout_handles_unicode from oletools.common import codepages # monkeypatch email to fix issue #32: diff --git a/oletools/ooxml.py b/oletools/ooxml.py index 9058824..3f3db45 100644 --- a/oletools/ooxml.py +++ b/oletools/ooxml.py @@ -17,7 +17,7 @@ TODO: "xml2003" == "flatopc"? import sys from oletools.common.log_helper import log_helper -from oletools.common import uopen +from oletools.common.io_encoding import uopen from zipfile import ZipFile, BadZipfile, is_zipfile from os.path import splitext import io @@ -650,7 +650,7 @@ def test(): see module doc for more info """ - from oletools.common import ensure_stdout_handles_unicode + from oletools.common.io_encoding import ensure_stdout_handles_unicode ensure_stdout_handles_unicode() log_helper.enable_logging(False, 'debug') if len(sys.argv) != 2: diff --git a/tests/common/test_encoding_handler.py b/tests/common/test_encoding_handler.py index 1e074e7..b8bdfc6 100644 --- a/tests/common/test_encoding_handler.py +++ b/tests/common/test_encoding_handler.py @@ -131,7 +131,7 @@ class TestEncodingHandler(unittest.TestCase): def run_read(filename): """This is called from test_uopen* tests as script. Reads text, compares""" - from oletools.common import uopen + from oletools.common.io_encoding import uopen # open file with uopen(filename, 'rt') as reader: # a few tests @@ -168,7 +168,7 @@ def run_read(filename): def run_print(): """This is called from test_read* tests as script. Prints & logs unicode""" - from oletools.common import ensure_stdout_handles_unicode + from oletools.common.io_encoding import ensure_stdout_handles_unicode from oletools.common.log_helper import log_helper ensure_stdout_handles_unicode() print(u'Check: \u2713') # print check mark