Skip to content

Commit

Permalink
Merge pull request #490 from pbabinca/ipython-frontend
Browse files Browse the repository at this point in the history
jirashell: Import InteractiveShellEmbed depending on IPython version
  • Loading branch information
ssbarnea authored Jan 5, 2018
2 parents 91d15af + 30c0423 commit 0ad2543
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion jira/jirashell.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def main():

jira = JIRA(options=options, basic_auth=basic_auth, oauth=oauth)

from IPython.frontend.terminal.embed import InteractiveShellEmbed
import IPython
# The top-level `frontend` package has been deprecated since IPython 1.0.
if IPython.version_info[0] >= 1:
from IPython.terminal.embed import InteractiveShellEmbed
else:
from IPython.frontend.terminal.embed import InteractiveShellEmbed

ipshell = InteractiveShellEmbed(
banner1='<JIRA Shell ' + __version__ + ' (' + jira.client_info() + ')>')
Expand Down

0 comments on commit 0ad2543

Please sign in to comment.