Skip to content

Commit

Permalink
Updated per reviewers suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
David Murphy committed Dec 21, 2022
1 parent fd875b2 commit 5a32a4b
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions salt/utils/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,16 @@

try:
from setuptools.distutils.version import LooseVersion as _LooseVersion
except ImportError:
log.debug(
"unable to import LooseVersion from setuptools.distutils.version, will attempt setuptools._distutils.version"
)
try:
from setuptools._distutils.version import LooseVersion as _LooseVersion
except:
log.debug("unable to import LooseVersion from setuptools._distutils.version")
raise ImportError()

try:
from setuptools.distutils.version import StrictVersion as _StrictVersion
except ImportError:
log.debug(
"unable to import StrictVersion from setuptools.distutils.version, will attempt setuptools._distutils.version"
"unable to import from setuptools.distutils.version, will attempt setuptools._distutils.version"
)
try:
from setuptools._distutils.version import LooseVersion as _LooseVersion
from setuptools._distutils.version import StrictVersion as _StrictVersion
except:
log.debug("unable to import StrictVersion from setuptools._distutils.version")
log.debug("unable to import from setuptools._distutils.version")
raise ImportError()


Expand Down

0 comments on commit 5a32a4b

Please sign in to comment.