diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-06 17:58:10 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2025-08-06 18:42:41 +0100 |
commit | 8eab4299c93014613dbadfee6770535b99d48746 (patch) | |
tree | 25f2a82d41ec7f78724b4821040873a83c64f9ff /klippy/extras | |
parent | 581208b2ffeeb2a2128aee0741fa3fd9e46358e2 (diff) | |
download | kutter-8eab4299c93014613dbadfee6770535b99d48746.tar.gz kutter-8eab4299c93014613dbadfee6770535b99d48746.tar.xz kutter-8eab4299c93014613dbadfee6770535b99d48746.zip |
Remove python2 support (first party)
Diffstat (limited to 'klippy/extras')
-rw-r--r-- | klippy/extras/virtual_sdcard.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py index aca257ea..85dd3616 100644 --- a/klippy/extras/virtual_sdcard.py +++ b/klippy/extras/virtual_sdcard.py @@ -3,7 +3,7 @@ # Copyright (C) 2018-2024 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. -import os, sys, logging, io +import os, logging, io VALID_GCODE_EXTS = ["gcode", "g", "gco"] @@ -305,10 +305,7 @@ class VirtualSD: # Dispatch command self.cmd_from_sd = True line = lines.pop() - if sys.version_info.major >= 3: - next_file_position = self.file_position + len(line.encode()) + 1 - else: - next_file_position = self.file_position + len(line) + 1 + next_file_position = self.file_position + len(line.encode()) + 1 self.next_file_position = next_file_position try: self.gcode.run_script(line) |