Show More
@@ -34,17 +34,17 b' class ImportDenier(object):' | |||
|
34 | 34 | sys.modules.pop(module_name, None) |
|
35 | 35 | self.__forbidden.add(module_name) |
|
36 | 36 | |
|
37 |
def find_module(self, |
|
|
38 | if pth: | |
|
37 | def find_module(self, fullname, path=None): | |
|
38 | if path: | |
|
39 | 39 | return |
|
40 |
if |
|
|
40 | if fullname in self.__forbidden: | |
|
41 | 41 | return self |
|
42 | 42 | |
|
43 |
def load_module(self, |
|
|
43 | def load_module(self, fullname): | |
|
44 | 44 | raise ImportError(""" |
|
45 | 45 | Importing %s disabled by IPython, which has |
|
46 | 46 | already imported an Incompatible QT Binding: %s |
|
47 |
""" % ( |
|
|
47 | """ % (fullname, loaded_api())) | |
|
48 | 48 | |
|
49 | 49 | ID = ImportDenier() |
|
50 | 50 | sys.meta_path.append(ID) |
General Comments 0
You need to be logged in to leave comments.
Login now