Module: check_mk
Branch: master
Commit: 5c569716aefd2c246c1c8eda8eaed0dda8e01e8d
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=5c569716aefd2c…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Jul 17 10:46:41 2018 +0200
Fixed and enabled unnecessary-semicolon warnings.
Change-Id: Ic42485ceb4594a87c0ca44028575ac34b91aa9d9
---
checks/winperf | 2 +-
cmk/ec/main.py | 2 +-
cmk/gui/plugins/sidebar/speedometer.py | 2 +-
cmk/gui/plugins/views/perfometers/check_mk.py | 14 +++++++-------
cmk/gui/plugins/views/webservice.py | 4 ++--
cmk/gui/prediction.py | 2 +-
cmk/gui/views.py | 2 +-
cmk/gui/wato/__init__.py | 2 +-
cmk_base/core_nagios.py | 2 +-
tests/pylint/pylintrc | 1 -
10 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/checks/winperf b/checks/winperf
index 33403f2..a6357bc 100644
--- a/checks/winperf
+++ b/checks/winperf
@@ -56,7 +56,7 @@ def check_win_cpuusage(item, params, info):
for cpu in range(0, num_cpus):
ticks = int(line[2 + cpu])
ticks_per_sec = get_rate("cpuusage.%d" % cpu, this_time,
ticks)
- secs_per_sec = ticks_per_sec / 10000000.0;
+ secs_per_sec = ticks_per_sec / 10000000.0
used_perc = 100 * (1 - secs_per_sec)
overall_perc += used_perc
diff --git a/cmk/ec/main.py b/cmk/ec/main.py
index 78b50cc..a69e16a 100644
--- a/cmk/ec/main.py
+++ b/cmk/ec/main.py
@@ -546,7 +546,7 @@ class HostConfig(object):
def lerp(a, b, t):
"""Linear interpolation between a and b with weight
t"""
- return (1 - t) * a + t * b;
+ return (1 - t) * a + t * b
class Perfcounters(object):
diff --git a/cmk/gui/plugins/sidebar/speedometer.py
b/cmk/gui/plugins/sidebar/speedometer.py
index aba3d7e..d7846fe 100644
--- a/cmk/gui/plugins/sidebar/speedometer.py
+++ b/cmk/gui/plugins/sidebar/speedometer.py
@@ -226,7 +226,7 @@ canvas#speedometer {
"GET services\n"
"Stats: suminv check_interval\n")[0] / 60.0
- percentage = 100.0 * current_rate / scheduled_rate;
+ percentage = 100.0 * current_rate / scheduled_rate
title = _("Scheduled service check rate: %.1f/s, current rate: %.1f/s,
that is "
"%.0f%% of the scheduled rate") % \
(scheduled_rate, current_rate, percentage)
diff --git a/cmk/gui/plugins/views/perfometers/check_mk.py
b/cmk/gui/plugins/views/perfometers/check_mk.py
index b56f2f2..f90d2fc 100644
--- a/cmk/gui/plugins/views/perfometers/check_mk.py
+++ b/cmk/gui/plugins/views/perfometers/check_mk.py
@@ -463,7 +463,7 @@ def perfometer_check_oracle_dataguard_stats(row, check_command,
perf_data):
days = 0
hours = 0
minutes = 0
- color = "#008f48";
+ color = "#008f48"
return "%02dd %02dh %02dm" % (days, hours, minutes),
perfometer_logarithmic(perfdata1, 2592000, 2, color)
@@ -471,13 +471,13 @@ perfometers["check_mk-oracle_dataguard_stats"] =
perfometer_check_oracle_da
def perfometer_oracle_sessions(row, check_command, perf_data):
if check_command != "check_mk-oracle_sessions":
- color = "#008f48";
- unit = "";
+ color = "#008f48"
+ unit = ""
else:
- color = "#4800ff";
- unit = "/h";
- value = int(perf_data[0][1]);
- return "%d%s" % (value, unit), perfometer_logarithmic(value, 50, 2,
color);
+ color = "#4800ff"
+ unit = "/h"
+ value = int(perf_data[0][1])
+ return "%d%s" % (value, unit), perfometer_logarithmic(value, 50, 2, color)
perfometers["check_mk-oracle_sessions"] = perfometer_oracle_sessions
perfometers["check_mk-oracle_logswitches"] = perfometer_oracle_sessions
diff --git a/cmk/gui/plugins/views/webservice.py b/cmk/gui/plugins/views/webservice.py
index 12130f0..95a472b 100644
--- a/cmk/gui/plugins/views/webservice.py
+++ b/cmk/gui/plugins/views/webservice.py
@@ -120,9 +120,9 @@ multisite_layouts["json"] = {
}
def render_jsonp(rows, view, group_cells, cells, num_columns, show_checkboxes):
- html.write("%s(\n" % html.var('jsonp', 'myfunction'));
+ html.write("%s(\n" % html.var('jsonp', 'myfunction'))
render_json(rows, view, group_cells, cells, num_columns, show_checkboxes)
- html.write_text(");\n");
+ html.write_text(");\n")
multisite_layouts["jsonp"] = {
"title" : _("JSONP data output"),
diff --git a/cmk/gui/prediction.py b/cmk/gui/prediction.py
index 7e0d20d..e4ac5a6 100644
--- a/cmk/gui/prediction.py
+++ b/cmk/gui/prediction.py
@@ -137,7 +137,7 @@ def page_graph():
vscala_high = vertical_range[1]
vert_scala = compute_vertical_scala(vscala_low, vscala_high)
time_scala = [ [timegroup["range"][0] + i*3600, "%02d:00" % i]
for i in range(0, 25, 2) ]
- render_coordinates(vert_scala, time_scala);
+ render_coordinates(vert_scala, time_scala)
if "levels_lower" in timegroup:
render_dual_area(swapped["average"], swapped["lower_warn"],
"#ffffff", 0.5)
diff --git a/cmk/gui/views.py b/cmk/gui/views.py
index d2d4edf..faf359f 100644
--- a/cmk/gui/views.py
+++ b/cmk/gui/views.py
@@ -2129,7 +2129,7 @@ def do_reschedule():
# a few ms later. We introduce a small wait time in order
# to increase the chance for the passive services already
# updated also when we return.
- time.sleep(0.7);
+ time.sleep(0.7)
html.write("['OK', %d, %d, %r]\n" % (row[0], row[1],
row[2].encode("utf-8")))
except Exception, e:
diff --git a/cmk/gui/wato/__init__.py b/cmk/gui/wato/__init__.py
index c8f051e..f2cb0bb 100644
--- a/cmk/gui/wato/__init__.py
+++ b/cmk/gui/wato/__init__.py
@@ -6224,7 +6224,7 @@ def interactive_progress(items, title, stats, finishvars, timewait,
fail_stats = []
if not termvars:
- termvars = finishvars;
+ termvars = finishvars
html.open_center()
html.open_table(class_="progress")
diff --git a/cmk_base/core_nagios.py b/cmk_base/core_nagios.py
index 6850f89..6a45bee 100644
--- a/cmk_base/core_nagios.py
+++ b/cmk_base/core_nagios.py
@@ -793,7 +793,7 @@ def _create_nagios_config_contacts(outfile, hostnames):
" host_notification_commands\tcheck-mk-notify\n"
" service_notification_commands\tcheck-mk-notify\n"
" contactgroups\t\t\tcheck-mk-notify\n"
- "}\n\n");
+ "}\n\n")
# Quote string for use in a nagios command execution.
diff --git a/tests/pylint/pylintrc b/tests/pylint/pylintrc
index 497e046..86f4bd0 100644
--- a/tests/pylint/pylintrc
+++ b/tests/pylint/pylintrc
@@ -62,7 +62,6 @@ disable=
too-many-statements,
ungrouped-imports,
unidiomatic-typecheck,
- unnecessary-semicolon,
unneeded-not,
unsubscriptable-object,
unsupported-membership-test,