Module: check_mk
Branch: master
Commit: deab0e3e822a5d3bdc615740dee29467d0f77988
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=deab0e3e822a5d…
Author: Florian Kromer <fk(a)mathias-kettner.de>
Date: Thu May 2 14:14:14 2019 +0200
Replace equality operators in checks
The comparison operators <> and != are alternative spellings of the same
operator. != is the preferred spelling; <> is obsolescent in Python 3.
Change-Id: I57649b8fbe971ad01df413cbe620d410772eac96
---
checks/oracle_asm_diskgroup | 6 +++---
checks/oracle_dataguard_stats | 6 +++---
checks/oracle_instance | 6 +++---
checks/oracle_locks | 2 +-
checks/vnx_quotas | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/checks/oracle_asm_diskgroup b/checks/oracle_asm_diskgroup
index c8d36d0..773a5f6 100644
--- a/checks/oracle_asm_diskgroup
+++ b/checks/oracle_asm_diskgroup
@@ -119,10 +119,10 @@ def parse_oracle_asm_diskgroup(info):
if first_node == '':
first_node = node_name
- elif first_node <> node_name:
+ elif first_node != node_name:
continue
- if len(stripped_line) <> 12:
+ if len(stripped_line) != 12:
# old format without fg data
parsed.setdefault(
@@ -323,7 +323,7 @@ def check_oracle_asm_diskgroup(item, params, parsed):
infotext += ', %i disks' % dg_disks
- if dgtype <> 'EXTERN':
+ if dgtype != 'EXTERN':
# EXTERN Redundancy has only 1 FG. => useless information
infotext += ' in %i failgroups' % fg_count
diff --git a/checks/oracle_dataguard_stats b/checks/oracle_dataguard_stats
index 389628b..272328d 100644
--- a/checks/oracle_dataguard_stats
+++ b/checks/oracle_dataguard_stats
@@ -113,9 +113,9 @@ def check_oracle_dataguard_stats(item, params, parsed):
yield 0, "Broker %s" % (dgdata['broker_state'].lower())
# Observer is only usable with enabled Fast Start Failover!
- if 'fs_failover_status' in dgdata and
dgdata['fs_failover_status'] <> 'DISABLED':
+ if 'fs_failover_status' in dgdata and
dgdata['fs_failover_status'] != 'DISABLED':
- if dgdata['fs_failover_observer_present'] <> 'YES':
+ if dgdata['fs_failover_observer_present'] != 'YES':
yield 2, "Observer not connected"
else:
yield 0, "Observer connected %s from host %s" % (
@@ -210,7 +210,7 @@ def check_oracle_dataguard_stats(item, params, parsed):
yield 0, '%s %s' % (dgstat_param,
get_age_human_readable(seconds)), perfdata
else:
if seconds is None:
- # seconds is None => state <> 0 from upper checks
+ # seconds is None => state != 0 from upper checks
yield state, '%s unknown time' % (dgstat_param),
perfdata
else:
yield state, '%s %s %s' % (dgstat_param,
get_age_human_readable(seconds),
diff --git a/checks/oracle_instance b/checks/oracle_instance
index c9e70cb..2554dbc 100644
--- a/checks/oracle_instance
+++ b/checks/oracle_instance
@@ -57,9 +57,9 @@ def inventory_oracle_instance(info):
# possible multitenant entry?
if len(line) > 12:
- # every pdb has a con_id <> 0
+ # every pdb has a con_id != 0
# Multitenant use DB_NAME.PDB_NAME as Service
- if line[12] == ('TRUE') and line[13] <> '0':
+ if line[12] == ('TRUE') and line[13] != '0':
inv_list.append((("%s.%s" % (line[0], line[14])), {}))
continue
@@ -99,7 +99,7 @@ def check_oracle_instance(item, params, info):
if len(line) > 12:
# Multitenant!
- if line[12] == ('TRUE') and line[13] <> '0':
+ if line[12] == ('TRUE') and line[13] != '0':
itemname = ("%s.%s" % (line[0], line[14]))
pdb = True
diff --git a/checks/oracle_locks b/checks/oracle_locks
index 6f41f7f..8f04d67 100644
--- a/checks/oracle_locks
+++ b/checks/oracle_locks
@@ -92,7 +92,7 @@ def check_oracle_locks(item, params, info):
elif lockcount > 10:
infotext = 'more then 10 locks existing!'
- if state <> -1:
+ if state != -1:
return (state, infotext)
# In case of missing information we assume that the login into
diff --git a/checks/vnx_quotas b/checks/vnx_quotas
index 8bb3b74..1b52c56 100644
--- a/checks/vnx_quotas
+++ b/checks/vnx_quotas
@@ -82,7 +82,7 @@ def parse_vnx_quotas(info):
parsed["fs"].setdefault(stripped_entries[0], {"data":
stripped_entries[1].split(",")})
elif section == "quotas":
- if len(stripped_entries) <> 5:
+ if len(stripped_entries) != 5:
continue
dms, fs, mp, used_str, limit_str = stripped_entries