Permalink
Browse files

suppress warning when trying to load init file with pyrepl

  • Loading branch information...
1 parent 38253ec commit 8f3c20bc7ad7365e9a63108a84468e08a9cfbca8 @minrk committed Mar 30, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 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)

0 comments on commit 8f3c20b

Please sign in to comment.