Skip to content

Commit 92f410a

Browse files
committed
fix: improve error in version checking
1 parent c8b18bb commit 92f410a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

mamonsu/plugins/pgsql/instance.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ def graphs(self, template):
124124

125125
def keys_and_queries(self, template_zabbix):
126126
result = []
127-
all_items = []
128-
if LooseVersion(self.VersionPG) > LooseVersion('11'):
129-
all_items = self.Items + self.Items_pg_12
130-
else:
127+
if LooseVersion(self.VersionPG) < LooseVersion('12'):
131128
all_items = self.Items
129+
else:
130+
all_items = self.Items + self.Items_pg_12
132131
for item in all_items:
133132
# split each item to get values for keys of both agent type and mamonsu type
134133
keys = item[1].split('[')

0 commit comments

Comments
 (0)