python: Use importlib for python3.
[ashd.git] / 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:]
-    mod = __import__(mname, fromlist = ["dummy"])
+    mod = importlib.import_module(mname)
     exts[ext] = getattr(mod, hname)
 
 def application(env, startreq):