From b9247810b90938339e87056a5d0f8a7f207d4ea4 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 17 Jun 2023 13:57:22 -0400 Subject: [PATCH] virtual_sdcard: reset file position and size to integer zero This resolves an issue with API server clients that always expect these values be be integers. Signed-off-by: Eric Callahan --- klippy/extras/virtual_sdcard.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py index 5c5a956f..31f283ff 100644 --- a/klippy/extras/virtual_sdcard.py +++ b/klippy/extras/virtual_sdcard.py @@ -119,7 +119,7 @@ class VirtualSD: self.current_file.close() self.current_file = None self.print_stats.note_cancel() - self.file_position = self.file_size = 0. + self.file_position = self.file_size = 0 # G-Code commands def cmd_error(self, gcmd): raise gcmd.error("SD write not supported") @@ -128,7 +128,7 @@ class VirtualSD: self.do_pause() self.current_file.close() self.current_file = None - self.file_position = self.file_size = 0. + self.file_position = self.file_size = 0 self.print_stats.reset() self.printer.send_event("virtual_sdcard:reset_file") cmd_SDCARD_RESET_FILE_help = "Clears a loaded SD File. Stops the print "\