##// END OF EJS Templates
Switch to try/except ImportError.
Matthias Bussonnier -
Show More
@@ -16,9 +16,9 b' from traitlets.config.configurable import SingletonConfigurable'
16 from traitlets import List, Bool, Unicode
16 from traitlets import List, Bool, Unicode
17 from IPython.utils.py3compat import cast_unicode, cast_unicode_py2 as u, PY3
17 from IPython.utils.py3compat import cast_unicode, cast_unicode_py2 as u, PY3
18
18
19 if PY3:
19 try: # Py3
20 from base64 import encodebytes
20 from base64 import encodebytes
21 else :
21 except ImportError: # Py2
22 from base64 import encodestring as encodebytes
22 from base64 import encodestring as encodebytes
23
23
24
24
General Comments 0
You need to be logged in to leave comments. Login now