mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +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 logging
|
||||
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.utils
|
||||
@ -35,6 +27,10 @@ import salt.utils.systemd
|
||||
from salt.exceptions import CommandExecutionError, MinionError
|
||||
import salt.ext.six as six
|
||||
|
||||
# Workaround for 'reload' builtin of py2.7
|
||||
if six.PY3:
|
||||
from importlib import reload
|
||||
|
||||
# Import third party libs
|
||||
HAS_PORTAGE = False
|
||||
try:
|
||||
|
@ -13,17 +13,13 @@ import logging
|
||||
import re
|
||||
import time
|
||||
|
||||
try:
|
||||
if globals()['__builtins__'].reload:
|
||||
pass
|
||||
except AttributeError:
|
||||
try:
|
||||
from importlib import reload
|
||||
except ImportError:
|
||||
from imp import reload
|
||||
|
||||
# Import salt libs
|
||||
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__)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user