Skip to content

Commit

Permalink
Fix: Napsty#72
Browse files Browse the repository at this point in the history
  • Loading branch information
p-try committed Feb 23, 2024
1 parent 7aaaae4 commit 5273858
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions check_esxi_hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,13 +293,17 @@
#@ Author : Claudio Kuenzler
#@ 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
import sys
import time
import pywbem
import re
import pkg_resources
import importlib.metadata
import json
from optparse import OptionParser,OptionGroup

Expand Down Expand Up @@ -734,7 +738,7 @@ def handler(signum, frame):
try:
pywbemversion = pywbem.__version__
except:
pywbemversion = pkg_resources.get_distribution("pywbem").version
pywbemversion = importlib.metadata.version("pywbem")
else:
pywbemversion = pywbem.__version__
verboseoutput("Found pywbem version "+pywbemversion)
Expand Down

0 comments on commit 5273858

Please sign in to comment.