mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix import error by utilizing six and strict version spec
This commit is contained in:
parent
95174e66f4
commit
05c598c75e
@ -19,14 +19,6 @@ from __future__ import absolute_import
|
|||||||
import copy
|
import copy
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
try:
|
|
||||||
if globals()['__builtins__'].reload:
|
|
||||||
pass
|
|
||||||
except AttributeError:
|
|
||||||
try:
|
|
||||||
from importlib import reload
|
|
||||||
except ImportError:
|
|
||||||
from imp import reload
|
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
import salt.utils
|
import salt.utils
|
||||||
@ -35,6 +27,10 @@ import salt.utils.systemd
|
|||||||
from salt.exceptions import CommandExecutionError, MinionError
|
from salt.exceptions import CommandExecutionError, MinionError
|
||||||
import salt.ext.six as six
|
import salt.ext.six as six
|
||||||
|
|
||||||
|
# Workaround for 'reload' builtin of py2.7
|
||||||
|
if six.PY3:
|
||||||
|
from importlib import reload
|
||||||
|
|
||||||
# Import third party libs
|
# Import third party libs
|
||||||
HAS_PORTAGE = False
|
HAS_PORTAGE = False
|
||||||
try:
|
try:
|
||||||
|
@ -13,17 +13,13 @@ import logging
|
|||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
try:
|
|
||||||
if globals()['__builtins__'].reload:
|
|
||||||
pass
|
|
||||||
except AttributeError:
|
|
||||||
try:
|
|
||||||
from importlib import reload
|
|
||||||
except ImportError:
|
|
||||||
from imp import reload
|
|
||||||
|
|
||||||
# Import salt libs
|
# Import salt libs
|
||||||
from salt.utils.timeout import wait_for
|
from salt.utils.timeout import wait_for
|
||||||
|
import salt.ext.six as six
|
||||||
|
|
||||||
|
# Workaround for 'reload' builtin of py2.7
|
||||||
|
if six.PY3:
|
||||||
|
from importlib import reload
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user