Module: check_mk
Branch: master
Commit: 75516b6ff1b4bd094e8548a044854be5c630b003
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=75516b6ff1b4bd…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Wed Sep 28 12:01:49 2016 +0200
Fixed unused variables
---
web/htdocs/cron.py | 5 ++---
web/htdocs/pagetypes.py | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/web/htdocs/cron.py b/web/htdocs/cron.py
index 996a003..8771c9d 100644
--- a/web/htdocs/cron.py
+++ b/web/htdocs/cron.py
@@ -25,6 +25,7 @@
# Boston, MA 02110-1301 USA.
import time
+import traceback
from lib import *
import cmk.paths
@@ -53,7 +54,6 @@ def load_plugins(force):
# There is no output written to the user in regular cases. Exceptions
# are written to the web log.
def page_run_cron():
- now = time.time()
# Prevent cron jobs from being run too often, also we need
# locking in order to prevent overlapping runs
if os.path.exists(lock_file):
@@ -66,9 +66,8 @@ def page_run_cron():
for cron_job in multisite_cronjobs:
try:
cron_job()
- except Exception, e:
+ except Exception:
html.write("An exception occured. Take a look at the web.log.\n")
- import traceback
logger(LOG_ERR, "Exception in cron_job [%s]:\n%s" %
(cron_job.__name__, traceback.format_exc()))
diff --git a/web/htdocs/pagetypes.py b/web/htdocs/pagetypes.py
index 0b75acb..3178e29 100644
--- a/web/htdocs/pagetypes.py
+++ b/web/htdocs/pagetypes.py
@@ -154,7 +154,7 @@ class Base(object):
# with more than one topic
parameters = []
for topic, elements in sorted_topics:
- for order, key, vs in elements:
+ for _unused_order, key, vs in elements:
parameters.append((key, vs))
return parameters