diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 11:43:14 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-09-27 12:38:20 -0400 |
commit | 8d5a9143bb550966c0b43ee4624c49bfaaa55a8c (patch) | |
tree | 96ba26d0673d364f89b4148a232f22855eba70fc /klippy/klippy.py | |
parent | 8f8951b4c1caf9bf5667a22b146ba22d184208e1 (diff) | |
download | kutter-8d5a9143bb550966c0b43ee4624c49bfaaa55a8c.tar.gz kutter-8d5a9143bb550966c0b43ee4624c49bfaaa55a8c.tar.xz kutter-8d5a9143bb550966c0b43ee4624c49bfaaa55a8c.zip |
klippy: Avoid using '%' syntax when calling logging module
The logging module can build strings directly from printf syntax - no
need to build the string first.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/klippy.py')
-rw-r--r-- | klippy/klippy.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/klippy.py b/klippy/klippy.py index a40d6da7..ff3b2280 100644 --- a/klippy/klippy.py +++ b/klippy/klippy.py @@ -159,7 +159,7 @@ class Printer: out.append(toolhead.stats(eventtime)) for m in self.mcus: out.append(m.stats(eventtime)) - logging.info("Stats %.1f: %s" % (eventtime, ' '.join(out))) + logging.info("Stats %.1f: %s", eventtime, ' '.join(out)) return eventtime + 1. def add_object(self, name, obj): self.objects[name] = obj @@ -217,8 +217,8 @@ class Printer: def run(self): systime = time.time() monotime = self.reactor.monotonic() - logging.info("Start printer at %s (%.1f %.1f)" % ( - time.asctime(time.localtime(systime)), systime, monotime)) + logging.info("Start printer at %s (%.1f %.1f)", + time.asctime(time.localtime(systime)), systime, monotime) # Enter main reactor loop try: self.reactor.run() |