Dolda2000 GitWeb
/
ashd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7fe08a6
)
python: Use importlib for python3.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 13 Dec 2011 04:56:14 +0000
(
05:56
+0100)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Tue, 13 Dec 2011 04:56:14 +0000
(
05:56
+0100)
python3/ashd/wsgidir.py
patch
|
blob
|
blame
|
history
diff --git
a/python3/ashd/wsgidir.py
b/python3/ashd/wsgidir.py
index
031952b
..
16ca1b5
100644
(file)
--- a/
python3/ashd/wsgidir.py
+++ b/
python3/ashd/wsgidir.py
@@
-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):