Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aeb226a

Browse files
committed
use try/except also for Py2.
imp.reload is actually aliased to the builtin
1 parent 1f18699 commit aeb226a

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

IPython/core/extensions.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
from traitlets.config.configurable import Configurable
1212
from IPython.utils.path import ensure_dir_exists
1313
from traitlets import Instance
14-
from IPython.utils.py3compat import PY3
15-
if PY3:
16-
try:
17-
from importlib import reload
18-
except ImportError :
19-
## deprecated since 3.4
20-
from imp import reload
14+
15+
try:
16+
from importlib import reload
17+
except ImportError :
18+
## deprecated since 3.4
19+
from imp import reload
2120

2221
#-----------------------------------------------------------------------------
2322
# Main class

0 commit comments

Comments
 (0)