Browse Source

Fix Python3 (Windows) compatibility (#15597)

Chris Pepper 5 years ago
parent
commit
11f1392026
No account linked to committer's email address
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py

+ 2
- 2
Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py View File

@@ -31,7 +31,7 @@ try:
31 31
         #
32 32
         import subprocess
33 33
         # typical result (string): 'Drives: C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
34
-        driveStr = subprocess.check_output("fsutil fsinfo drives")
34
+        driveStr = subprocess.check_output("fsutil fsinfo drives").decode('utf8')
35 35
         # typical result (string): 'C:\ D:\ E:\ F:\ G:\ H:\ I:\ J:\ K:\ L:\ M:\ Y:\ Z:\'
36 36
         driveStr = driveStr.strip().lstrip('Drives: ')
37 37
         # typical result (array of stings): ['C:\\', 'D:\\', 'E:\\', 'F:\\',
@@ -44,7 +44,7 @@ try:
44 44
         for drive in drives:
45 45
             final_drive_name = drive.strip().rstrip('\\')   # typical result (string): 'C:'
46 46
             try:
47
-                volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT)
47
+                volume_info = subprocess.check_output('cmd /C dir ' + final_drive_name, stderr=subprocess.STDOUT).decode('utf8')
48 48
             except Exception as e:
49 49
                 continue
50 50
             else:

Loading…
Cancel
Save