aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/virtual_sdcard.py
diff options
context:
space:
mode:
Diffstat (limited to 'klippy/extras/virtual_sdcard.py')
-rw-r--r--klippy/extras/virtual_sdcard.py7
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)