From 11f1392026606f94db0e00e4758031df757e9e16 Mon Sep 17 00:00:00 2001 From: Chris Pepper Date: Fri, 18 Oct 2019 21:15:26 +0100 Subject: [PATCH] Fix Python3 (Windows) compatibility (#15597) --- Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py index 44e0f09ad0..7f2a023630 100644 --- a/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py +++ b/Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py @@ -31,7 +31,7 @@ try: # import subprocess # typical result (string): 'Drives: C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\' - driveStr = subprocess.check_output("fsutil fsinfo drives") + driveStr = subprocess.check_output("fsutil fsinfo drives").decode('utf8') # typical result (string): 'C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\' driveStr = driveStr.strip().lstrip('Drives: ') # typical result (array of stings): ['C:\\', 'D:\\', 'E:\\', 'F:\\', @@ -44,7 +44,7 @@ try: for drive in drives: final_drive_name = drive.strip().rstrip('\\') # typical result (string): 'C:' try: - volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT) + volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT).decode('utf8') except Exception as e: continue else: