python: Use importlib for python3.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 13 Dec 2011 04:56:14 +0000 (05:56 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 13 Dec 2011 04:56:14 +0000 (05:56 +0100)
python3/ashd/wsgidir.py

index 031952b..16ca1b5 100644 (file)
@@ -129,7 +129,7 @@ def addext(ext, handler):
     p = handler.rindex('.')
     mname = handler[:p]
     hname = handler[p + 1:]
     p = handler.rindex('.')
     mname = handler[:p]
     hname = handler[p + 1:]
-    mod = __import__(mname, fromlist = ["dummy"])
+    mod = importlib.import_module(mname)
     exts[ext] = getattr(mod, hname)
 
 def application(env, startreq):
     exts[ext] = getattr(mod, hname)
 
 def application(env, startreq):