Blob Blame History Raw
#
# https://bitbucket.org/bobf/bpython/commits/c921fc4081bab577ea9cb8591da2a122bbda9464/raw/
#
# HG changeset patch
# User Andreas Stuehrk <andreas@bpython-interpreter.org>
# Date 1362260102 -3600
# Branch 0.12-bugfix
# Node ID c921fc4081bab577ea9cb8591da2a122bbda9464
# Parent  1fe02b22a071ebcaebeea1b54bec9b749a4bef2a
Ignore IOError raised by ``imp.find_module``. Fixes #237.

diff -r 1fe02b22a071ebcaebeea1b54bec9b749a4bef2a -r c921fc4081bab577ea9cb8591da2a122bbda9464 bpython/importcompletion.py
--- a/bpython/importcompletion.py	Sun Jan 27 16:15:02 2013 +0100
+++ b/bpython/importcompletion.py	Sat Mar 02 22:35:02 2013 +0100
@@ -134,7 +134,7 @@
             with catch_warnings():
                 warnings.simplefilter("ignore", ImportWarning)
                 fo, pathname, _ = imp.find_module(name, [path])
-        except (ImportError, SyntaxError):
+        except (ImportError, IOError, SyntaxError):
             continue
         except UnicodeEncodeError:
             # Happens with Python 3 when there is a filename in some