mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-10-26 07:46:11 +01:00
configfile: Use Python2's ConfigParser when running on Python2
The backport of Python3's configparser causes issues when there is unicode characters in the config file. To avoid introducing new errors, go back to using the Python2 version of ConfigParser when running on Python2. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -98,7 +98,8 @@ 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, time
|
||||
import ConfigParser, Queue, io, StringIO, time
|
||||
sys.modules["configparser"] = ConfigParser
|
||||
sys.modules["queue"] = Queue
|
||||
io.StringIO = StringIO.StringIO
|
||||
time.process_time = time.clock
|
||||
|
||||
Reference in New Issue
Block a user