##// END OF EJS Templates
Merge pull request #5933 from minrk/qt_loader...
Min RK -
r16864:604b227c merge
parent child Browse files
Show More
@@ -34,17 +34,17 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, mod_name, pth):
37 def find_module(self, fullname, path=None):
38 if pth:
38 if path:
39 return
39 return
40 if mod_name in self.__forbidden:
40 if fullname in self.__forbidden:
41 return self
41 return self
42
42
43 def load_module(self, mod_name):
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 """ % (mod_name, loaded_api()))
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