fix qt_loader import hook signature
to match PEP 302
closes
@@ -33,17 +33,17 @@ class ImportDenier(object):
sys.modules.pop(module_name, None)
self.__forbidden = module_name
- def find_module(self, mod_name, pth):
- if pth:
+ def find_module(self, fullname, path=None):
+ if path:
return
- if mod_name == self.__forbidden:
+ if fullname == self.__forbidden:
return self
- def load_module(self, mod_name):
+ def load_module(self, fullname):
raise ImportError("""
Importing %s disabled by IPython, which has
already imported an Incompatible QT Binding: %s
- """ % (mod_name, loaded_api()))
+ """ % (fullname, loaded_api()))
ID = ImportDenier()
sys.meta_path.append(ID)
