Skip to content

Commit

Permalink
Python 3 module reload compatability
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed Sep 25, 2016
1 parent 76dca64 commit 6ee1ad8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/loader.py
Expand Up @@ -35,6 +35,7 @@

# Import 3rd-party libs
import salt.ext.six as six
from salt.ext.six.moves import reload_module
try:
import pkg_resources
HAS_PKG_RESOURCES = True
Expand Down Expand Up @@ -1286,7 +1287,7 @@ def _reload_submodules(self, mod):
for submodule in submodules:
# it is a submodule if the name is in a namespace under mod
if submodule.__name__.startswith(mod.__name__ + '.'):
reload(submodule)
reload_module(submodule)
self._reload_submodules(submodule)

def _load_module(self, name):
Expand Down

0 comments on commit 6ee1ad8

Please sign in to comment.