mirror of
https://github.com/Napsty/check_esxi_hardware.git
synced 2024-11-25 03:43:49 +01:00
Fix: #72
This commit is contained in:
parent
7aaaae4337
commit
527385821c
@ -293,13 +293,17 @@
|
|||||||
#@ Author : Claudio Kuenzler
|
#@ Author : Claudio Kuenzler
|
||||||
#@ Reason : Fix bug when missing S/N (issue #68)
|
#@ Reason : Fix bug when missing S/N (issue #68)
|
||||||
#@---------------------------------------------------
|
#@---------------------------------------------------
|
||||||
|
#@ Date : 20240223
|
||||||
|
#@ Author : Julian Petri
|
||||||
|
#@ Reason : Fix deprecation of pkg_resources (issue #55)
|
||||||
|
#@---------------------------------------------------
|
||||||
|
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
import pywbem
|
import pywbem
|
||||||
import re
|
import re
|
||||||
import pkg_resources
|
import importlib.metadata
|
||||||
import json
|
import json
|
||||||
from optparse import OptionParser,OptionGroup
|
from optparse import OptionParser,OptionGroup
|
||||||
|
|
||||||
@ -734,7 +738,7 @@ verboseoutput("Connection to "+hosturl)
|
|||||||
try:
|
try:
|
||||||
pywbemversion = pywbem.__version__
|
pywbemversion = pywbem.__version__
|
||||||
except:
|
except:
|
||||||
pywbemversion = pkg_resources.get_distribution("pywbem").version
|
pywbemversion = importlib.metadata.version("pywbem")
|
||||||
else:
|
else:
|
||||||
pywbemversion = pywbem.__version__
|
pywbemversion = pywbem.__version__
|
||||||
verboseoutput("Found pywbem version "+pywbemversion)
|
verboseoutput("Found pywbem version "+pywbemversion)
|
||||||
|
Loading…
Reference in New Issue
Block a user