aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2020-06-11 22:48:18 -0400
committerKevin O'Connor <kevin@koconnor.net>2021-10-01 19:22:13 -0400
commit9ce07921c4690f3fab2a6ad9beaab4848f4732b9 (patch)
tree711e9ffc3cd3a0d0f1aa07182896ad9b028d6721 /scripts
parent2978771ce584aac6d8df91bf3e128085bb790f59 (diff)
downloadkutter-9ce07921c4690f3fab2a6ad9beaab4848f4732b9.tar.gz
kutter-9ce07921c4690f3fab2a6ad9beaab4848f4732b9.tar.xz
kutter-9ce07921c4690f3fab2a6ad9beaab4848f4732b9.zip
test_klippy: Convert to Python3 string encoding
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/test_klippy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/test_klippy.py b/scripts/test_klippy.py
index dff0b8e6..8363ca0b 100644
--- a/scripts/test_klippy.py
+++ b/scripts/test_klippy.py
@@ -37,7 +37,7 @@ class TestCase:
config_fname = gcode_fname = dict_fnames = None
should_fail = multi_tests = False
gcode = []
- f = open(self.fname, 'rb')
+ f = open(self.fname, 'r')
for line in f:
cpos = line.find('#')
if cpos >= 0:
@@ -78,7 +78,7 @@ class TestCase:
if gcode_fname is None:
gcode_fname = self.relpath(TEMP_GCODE_FILE, 'temp')
gcode_is_temp = True
- f = open(gcode_fname, 'wb')
+ f = open(gcode_fname, 'w')
f.write('\n'.join(gcode + ['']))
f.close()
elif gcode:
@@ -126,7 +126,7 @@ class TestCase:
return "internal error"
return "success"
def show_log(self):
- f = open(TEMP_LOG_FILE, 'rb')
+ f = open(TEMP_LOG_FILE, 'r')
data = f.read()
f.close()
sys.stdout.write(data)