From fb2f9637e8e5693a6b909824bef93b8d42ddb2c5 2010-08-20 21:39:06 From: epatters Date: 2010-08-20 21:39:06 Subject: [PATCH] Fixed line_number being inserted as a string into the %edit payload. --- diff --git a/IPython/frontend/qt/console/ipython_widget.py b/IPython/frontend/qt/console/ipython_widget.py index 5689268..b140e7b 100644 --- a/IPython/frontend/qt/console/ipython_widget.py +++ b/IPython/frontend/qt/console/ipython_widget.py @@ -25,7 +25,7 @@ class IPythonWidget(FrontendWidget): # Signal emitted when an editor is needed for a file and the editor has been # specified as 'custom'. See 'set_editor' for more information. - custom_edit_requested = QtCore.pyqtSignal(object, int) + custom_edit_requested = QtCore.pyqtSignal(object, object) # The default stylesheet: black text on a white background. default_stylesheet = """ diff --git a/IPython/zmq/zmqshell.py b/IPython/zmq/zmqshell.py index 6aaae9e..ecbf85e 100644 --- a/IPython/zmq/zmqshell.py +++ b/IPython/zmq/zmqshell.py @@ -246,6 +246,12 @@ class ZMQInteractiveShell(InteractiveShell): # Default line number value lineno = opts.get('n',None) + if lineno is not None: + try: + lineno = int(lineno) + except: + warn("The -n argument must be an integer.") + return if opts_p: args = '_%s' % last_call[0]