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