##// END OF EJS Templates
Backport PR #5933: fix qt_loader import hook signature...
MinRK -
Show More
@@ -32,17 +32,17 b' class ImportDenier(object):'
32 sys.modules.pop(module_name, None)
32 sys.modules.pop(module_name, None)
33 self.__forbidden = module_name
33 self.__forbidden = module_name
34
34
35 def find_module(self, mod_name, pth):
35 def find_module(self, fullname, path=None):
36 if pth:
36 if path:
37 return
37 return
38 if mod_name == self.__forbidden:
38 if fullname == self.__forbidden:
39 return self
39 return self
40
40
41 def load_module(self, mod_name):
41 def load_module(self, fullname):
42 raise ImportError("""
42 raise ImportError("""
43 Importing %s disabled by IPython, which has
43 Importing %s disabled by IPython, which has
44 already imported an Incompatible QT Binding: %s
44 already imported an Incompatible QT Binding: %s
45 """ % (mod_name, loaded_api()))
45 """ % (fullname, loaded_api()))
46
46
47 ID = ImportDenier()
47 ID = ImportDenier()
48 sys.meta_path.append(ID)
48 sys.meta_path.append(ID)
General Comments 0
You need to be logged in to leave comments. Login now