aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/configfile.py
diff options
context:
space:
mode:
authorThijs Triemstra <info@collab.nl>2023-11-17 04:06:13 +0100
committerGitHub <noreply@github.com>2023-11-16 22:06:13 -0500
commit4688c21c54dfb89ef9902b607521a8cc0e99c94a (patch)
tree4f446f98f659335ef6036c614d40b3298f8230dd /klippy/configfile.py
parent3f8f30d6123c647c05ba3f4f58477d9dda36f03f (diff)
downloadkutter-4688c21c54dfb89ef9902b607521a8cc0e99c94a.tar.gz
kutter-4688c21c54dfb89ef9902b607521a8cc0e99c94a.tar.xz
kutter-4688c21c54dfb89ef9902b607521a8cc0e99c94a.zip
klippy: Replace deprecated logger.warn with logger.warning (#6385)
Replace deprecated logger.warn with logger.warning logger.warn will be removed in Python 3.13 Signed-off-by: Thijs Triemstra <info@collab.nl>
Diffstat (limited to 'klippy/configfile.py')
-rw-r--r--klippy/configfile.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/klippy/configfile.py b/klippy/configfile.py
index dd32d47f..e5c0fb20 100644
--- a/klippy/configfile.py
+++ b/klippy/configfile.py
@@ -172,16 +172,16 @@ class PrinterConfig:
autosave_data = data[pos + len(AUTOSAVE_HEADER):].strip()
# Check for errors and strip line prefixes
if "\n#*# " in regular_data:
- logging.warn("Can't read autosave from config file"
- " - autosave state corrupted")
+ logging.warning("Can't read autosave from config file"
+ " - autosave state corrupted")
return data, ""
out = [""]
for line in autosave_data.split('\n'):
if ((not line.startswith("#*#")
or (len(line) >= 4 and not line.startswith("#*# ")))
and autosave_data):
- logging.warn("Can't read autosave from config file"
- " - modifications after header")
+ logging.warning("Can't read autosave from config file"
+ " - modifications after header")
return data, ""
out.append(line[4:])
out.append("")