1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
From: Julian Taylor <jtaylor.debian@googlemail.com>
Date: Thu, 7 Jul 2011 18:19:04 +0200
Subject: debianize error messages
---
IPython/scripts/ipython | 6 +++++-
IPython/zmq/__init__.py | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
--- a/IPython/scripts/ipython
+++ b/IPython/scripts/ipython
@@ -4,4 +4,13 @@
from IPython.frontend.terminal.ipapp import launch_new_instance
-launch_new_instance()
+try:
+ launch_new_instance()
+except ImportError as e:
+ if "qt.console.qtconsoleapp" in e.message:
+ print "Could not start qtconsole. Please install ipython-qtconsole"
+ elif "html.notebook.notebookapp" in e.message:
+ print "Could not start notebook. Please install ipython-notebook"
+ else:
+ # if there is no clue on the cause -- just re-raise
+ raise
--- a/IPython/zmq/__init__.py
+++ b/IPython/zmq/__init__.py
@@ -50,12 +50,12 @@
try:
import zmq
except ImportError:
- raise ImportError("%s requires pyzmq >= %s"%(module, minimum_version))
+ raise ImportError("%s requires python-zmq >= %s"%(module, minimum_version))
pyzmq_version = zmq.__version__
if 'dev' not in pyzmq_version and V(pyzmq_version) < V(minimum_version):
- raise ImportError("%s requires pyzmq >= %s, but you have %s"%(
+ raise ImportError("%s requires python-zmq >= %s, but you have %s"%(
module, minimum_version, pyzmq_version))
if V(zmq.zmq_version()) >= V('4.0.0'):
|