diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2021-10-04 15:09:10 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2021-10-04 15:10:46 -0400 |
commit | cc63fd51b226f86aa684342241c20e2e2b84f8da (patch) | |
tree | 2eaef79a5a6cd96e536000518901cdef568c8490 /klippy/util.py | |
parent | 41d42a07bf2ad23762dac02b615865efa86adfec (diff) | |
download | kutter-cc63fd51b226f86aa684342241c20e2e2b84f8da.tar.gz kutter-cc63fd51b226f86aa684342241c20e2e2b84f8da.tar.xz kutter-cc63fd51b226f86aa684342241c20e2e2b84f8da.zip |
scripts: Use backport of a recent Python3 configparser on Python2
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/util.py')
-rw-r--r-- | klippy/util.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/klippy/util.py b/klippy/util.py index 6d110e47..eabd2263 100644 --- a/klippy/util.py +++ b/klippy/util.py @@ -98,16 +98,10 @@ def setup_python2_wrappers(): if sys.version_info.major >= 3: return # Add module hacks so that common Python3 module imports work in Python2 - import Queue, io, StringIO, ConfigParser, time + import Queue, io, StringIO, time sys.modules["queue"] = Queue io.StringIO = StringIO.StringIO time.process_time = time.clock - sys.modules["configparser"] = ConfigParser - OrigRawConfigParser = ConfigParser.RawConfigParser - def RCP(strict=False, *args, **kwargs): - return OrigRawConfigParser(*args, **kwargs) - RCP.SECTCRE = OrigRawConfigParser.SECTCRE - ConfigParser.RawConfigParser = RCP setup_python2_wrappers() |