]> www.dolda2000.com Git - ashd.git/commitdiff
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 031952bc97e6595f2d82f5629812118f35f8ca0c..16ca1b58e3cd844c75a3aff6c474325191ee6909 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):