Skip to content

Commit

Permalink
Fix version check if no min_version provided
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolai Buchwitz committed Mar 19, 2019
1 parent 7305b8d commit c1e6d75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check_pve.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def checkVersion(self):
if not data['version']:
self.checkResult = NagiosState.UNKNOWN
self.checkMessage = "Unable to determine pve version"
elif LooseVersion(self.options.min_version) > LooseVersion(data['version']):
elif self.options.min_version and LooseVersion(self.options.min_version) > LooseVersion(data['version']):
self.checkResult = NagiosState.CRITICAL
self.checkMessage = "Current pve version '{}' ({}) is lower than the min. required version '{}'".format(data['version'], data['repoid'], self.options.min_version)
else:
Expand Down

0 comments on commit c1e6d75

Please sign in to comment.