aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/util.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2017-09-27 11:43:14 -0400
committerKevin O'Connor <kevin@koconnor.net>2017-09-27 12:38:20 -0400
commit8d5a9143bb550966c0b43ee4624c49bfaaa55a8c (patch)
tree96ba26d0673d364f89b4148a232f22855eba70fc /klippy/util.py
parent8f8951b4c1caf9bf5667a22b146ba22d184208e1 (diff)
downloadkutter-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/util.py')
-rw-r--r--klippy/util.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/klippy/util.py b/klippy/util.py
index 6c9cad6b..4a528439 100644
--- a/klippy/util.py
+++ b/klippy/util.py
@@ -43,8 +43,8 @@ def get_cpu_info():
data = f.read()
f.close()
except OSError:
- logging.debug("Exception on read /proc/cpuinfo: %s" % (
- traceback.format_exc(),))
+ logging.debug("Exception on read /proc/cpuinfo: %s",
+ traceback.format_exc())
return "?"
lines = [l.split(':', 1) for l in data.split('\n')]
lines = [(l[0].strip(), l[1].strip()) for l in lines if len(l) == 2]
@@ -64,6 +64,6 @@ def get_git_version():
output = process.communicate()[0]
retcode = process.poll()
except OSError:
- logging.debug("Exception on run: %s" % (traceback.format_exc(),))
+ logging.debug("Exception on run: %s", traceback.format_exc())
return "?"
return output.strip()