mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Moved imports to top, out of _get_moto_version function
This commit is contained in:
parent
02f9ba99ba
commit
b7ac6c735a
1 changed files with 2 additions and 2 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
# Import Python Libs
|
||||
from distutils.version import LooseVersion # pylint: disable=no-name-in-module
|
||||
import pkg_resources
|
||||
from pkg_resources import DistributionNotFound
|
||||
|
||||
# Import Salt Testing Libs
|
||||
from salttesting import skipIf, TestCase
|
||||
|
@ -80,8 +82,6 @@ def _get_moto_version():
|
|||
try:
|
||||
return LooseVersion(moto.__version__)
|
||||
except AttributeError:
|
||||
import pkg_resources
|
||||
from pkg_resources import DistributionNotFound
|
||||
try:
|
||||
return LooseVersion(pkg_resources.get_distribution('moto').version)
|
||||
except DistributionNotFound:
|
||||
|
|
Loading…
Add table
Reference in a new issue