Commit d5276eae authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

IPython: Abort if not installed

parent c5a8cbc3
...@@ -38,6 +38,7 @@ import time ...@@ -38,6 +38,7 @@ import time
import logging import logging
from functools import partial from functools import partial
from threading import Thread from threading import Thread
from importlib.util import find_spec
from gi.repository import Gtk from gi.repository import Gtk
from gi.repository import GLib from gi.repository import GLib
...@@ -2074,6 +2075,13 @@ class Interface: ...@@ -2074,6 +2075,13 @@ class Interface:
@staticmethod @staticmethod
def create_ipython_window(): def create_ipython_window():
# Check if IPython is installed
ipython = find_spec('IPython')
is_installed = ipython is not None
if not is_installed:
# Abort early to avoid tracebacks
print('IPython is not installed')
return
try: try:
from gajim.dev.ipython_view import IPythonView from gajim.dev.ipython_view import IPythonView
except ImportError: except ImportError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment