Module: check_mk
Branch: master
Commit: 9ee74c2992eff8659c474495d27ca466e6fdf7ad
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=9ee74c2992eff8…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Jul 27 10:39:47 2018 +0200
Fixed and enabled logging-not-lazy warning.
Change-Id: Ia38023013adb77e3aa62e084d98d795d0626d464
---
cmk/log.py | 2 +-
cmk/profile.py | 4 ++--
tests/pylint/pylintrc | 1 -
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/cmk/log.py b/cmk/log.py
index 3181a1d..bf5cd4e 100644
--- a/cmk/log.py
+++ b/cmk/log.py
@@ -155,7 +155,7 @@ def open_log(log_file_path, fallback_to=None):
logfile = file(log_file_path, "a")
logfile.flush()
except Exception, e:
- logger.exception("Cannot open log file '%s': %s" %
(log_file_path , e))
+ logger.exception("Cannot open log file '%s': %s", log_file_path
, e)
if fallback_to:
logfile = fallback_to
diff --git a/cmk/profile.py b/cmk/profile.py
index 062a03b..ba57a11 100644
--- a/cmk/profile.py
+++ b/cmk/profile.py
@@ -61,7 +61,7 @@ class Profile(object):
self._profile.print_stats()
else:
self._profile.dump_stats(self._profile_file)
- cmk.log.logger.info("Created profile file: %s" %
self._profile_file)
+ cmk.log.logger.info("Created profile file: %s",
self._profile_file)
file(self._profile_file + ".py", "w").write(
"#!/usr/bin/env python\n"
@@ -69,7 +69,7 @@ class Profile(object):
"stats = pstats.Stats(%r)\n"
"stats.sort_stats('time').print_stats()\n" %
self._profile_file)
os.chmod(self._profile_file + ".py", 0o755)
- cmk.log.logger.info("Created profile dump script: %s.py" %
self._profile_file)
+ cmk.log.logger.info("Created profile dump script: %s.py",
self._profile_file)
def profile_call(base_dir, enabled=True):
diff --git a/tests/pylint/pylintrc b/tests/pylint/pylintrc
index 1df6709..f91b997 100644
--- a/tests/pylint/pylintrc
+++ b/tests/pylint/pylintrc
@@ -14,7 +14,6 @@ extension-pkg-whitelist=rrdtool,_ldap,netifaces,pymssql
disable=
cell-var-from-loop,
inconsistent-return-statements,
- logging-not-lazy,
missing-docstring,
no-else-return,
no-self-use,