Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

suppress warning when trying to load init file with pyrepl

  • Loading branch information...
commit 8f3c20bc7ad7365e9a63108a84468e08a9cfbca8 1 parent 38253ec
@minrk authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 IPython/core/interactiveshell.py
View
4 IPython/core/interactiveshell.py
@@ -28,6 +28,7 @@
import sys
import tempfile
import types
+import warnings
from io import open as io_open
from IPython.config.configurable import SingletonConfigurable
@@ -1843,7 +1844,8 @@ def init_readline(self):
inputrc_name = os.path.join(self.home_dir, inputrc_name)
if os.path.isfile(inputrc_name):
try:
- readline.read_init_file(inputrc_name)
+ with warnings.catch_warnings('ignore'):
+ readline.read_init_file(inputrc_name)
except:
warn('Problems reading readline initialization file <%s>'
% inputrc_name)
Please sign in to comment.
Something went wrong with that request. Please try again.