From 5cf5885d4b1bc053b16d48dd62ab76c6ab63f439 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Sat, 14 Dec 2024 19:40:31 +0100 Subject: [PATCH] Set default parameter for int.to_bytes() so that the editor is compatible with Python<3.12 The parameter is only standard since Python3.12. --- bread_editor/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bread_editor/file.py b/bread_editor/file.py index 4b8a8fd..0802f5d 100644 --- a/bread_editor/file.py +++ b/bread_editor/file.py @@ -22,7 +22,7 @@ class FileActions: if dialog.exec(): self.open_multiple_files(dialog.selectedFiles()) - def create_file(self, content: bytes=(0).to_bytes(1)): + def create_file(self, content: bytes=(0).to_bytes(1, "big")): # open a dialog where the user can choose a new filepath and create an empty file at that path # bytes=(0).to_bytes(1) creates a byte with only zeros in it