Skip to content

Commit 89f9e50

Browse files
committed
Added support for pywbem 0.9.x (and upcoming releases)
1 parent 82a4156 commit 89f9e50

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

check_esxi_hardware.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@
239239
#@ Author : Claudio Kuenzler (www.claudiokuenzler.com)
240240
#@ Reason : Add parameter for variable CIM port (useful when behind NAT)
241241
#@---------------------------------------------------
242+
#@ Date : 20161013
243+
#@ Author : Claudio Kuenzler (www.claudiokuenzler.com)
244+
#@ Reason : Added support for pywbem 0.9.x (and upcoming releases)
245+
#@---------------------------------------------------
242246

243247
import sys
244248
import time
@@ -247,7 +251,7 @@
247251
import pkg_resources
248252
from optparse import OptionParser,OptionGroup
249253

250-
version = '20160531'
254+
version = '20161013'
251255

252256
NS = 'root/cimv2'
253257
hosturl = ''
@@ -615,7 +619,7 @@ def handler(signum, frame):
615619
verboseoutput("Connection worked")
616620
wbemclient = pywbem.WBEMConnection(hosturl, (user,password))
617621
# pywbem 0.8.0 and later
618-
elif '0.8.' in pywbemversion:
622+
else:
619623
wbemclient = pywbem.WBEMConnection(hosturl, (user,password), NS, no_verification=True)
620624

621625
# Add a timeout for the script. When using with Nagios, the Nagios timeout cannot be < than plugin timeout.

0 commit comments

Comments
 (0)