From 8eab4299c93014613dbadfee6770535b99d48746 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 6 Aug 2025 17:58:10 +0100 Subject: Remove python2 support (first party) --- klippy/extras/virtual_sdcard.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'klippy/extras/virtual_sdcard.py') 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 # # 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) -- cgit v1.2.3-70-g09d2