mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-07 06:57:38 -06:00
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>
This commit is contained in:
parent
8f8951b4c1
commit
8d5a9143bb
8 changed files with 32 additions and 32 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue