aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2025-08-15 21:40:35 +0100
committerTomasz Kramkowski <tomasz@kramkow.ski>2025-08-15 21:46:37 +0100
commite48c5758975756271ae4bf4b9eae538d0a411c21 (patch)
treefdaf9007d6f668eab3618ba8d1302ff46bdb285a
parent2e957a0efca9ca8f029b7787ba7ebafb2b5aa56a (diff)
downloadkutter-e48c5758975756271ae4bf4b9eae538d0a411c21.tar.gz
kutter-e48c5758975756271ae4bf4b9eae538d0a411c21.tar.xz
kutter-e48c5758975756271ae4bf4b9eae538d0a411c21.zip
Clean up bglogger handling
-rw-r--r--klippy/klippy.py24
1 files changed, 10 insertions, 14 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py
index c1821b13..7a875c28 100644
--- a/klippy/klippy.py
+++ b/klippy/klippy.py
@@ -354,18 +354,15 @@ def main():
start_args["software_version"] = __version__
start_args["cpu_info"] = util.get_cpu_info()
start_args["runtime_config"] = options.runtime_config
- if bglogger is not None:
- versions = "\n".join(
- [
- "Args: %s" % (sys.argv,),
- "Version: %s" % (__version__,),
- "CPU: %s" % (start_args["cpu_info"],),
- "Python: %s" % (repr(sys.version),),
- ]
- )
- logging.info(versions)
- elif not options.debugoutput:
- logging.warning("No log file specified!" " Severe timing issues may result!")
+ versions = "\n".join(
+ [
+ "Args: %s" % (sys.argv,),
+ "Version: %s" % (__version__,),
+ "CPU: %s" % (start_args["cpu_info"],),
+ "Python: %s" % (repr(sys.version),),
+ ]
+ )
+ logging.info(versions)
gc.disable()
# Start Printer() class
@@ -382,8 +379,7 @@ def main():
logging.info("Restarting printer")
start_args["start_reason"] = res
- if bglogger is not None:
- bglogger.stop()
+ bglogger.stop()
if res == "error_exit":
sys.exit(-1)