Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python: Initial porting of the Python code to Python 3.
[ashd.git]
/
python
/
scgi-wsgi
diff --git
a/python/scgi-wsgi
b/python/scgi-wsgi
index
006f375
..
9befb25
100755
(executable)
--- a/
python/scgi-wsgi
+++ b/
python/scgi-wsgi
@@
-1,4
+1,4
@@
-#!/usr/bin/python
+#!/usr/bin/python
3
import sys, os, getopt
import socket
import sys, os, getopt
import socket
@@
-20,7
+20,7
@@
for o, a in opts:
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
p = a.rfind(":")
if p < 0:
sk = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
p = a.rfind(":")
if p < 0:
- bindhost = "
hostname
"
+ bindhost = "
localhost
"
bindport = int(a)
else:
bindhost = a[:p]
bindport = int(a)
else:
bindhost = a[:p]
@@
-41,8
+41,8
@@
if sk is None:
try:
handlermod = __import__(args[0], fromlist = ["dummy"])
try:
handlermod = __import__(args[0], fromlist = ["dummy"])
-except ImportError
,
exc:
- sys.stderr.write("scgi-wsgi: handler %s not found: %s\n" % (args[0], exc.
message
))
+except ImportError
as
exc:
+ sys.stderr.write("scgi-wsgi: handler %s not found: %s\n" % (args[0], exc.
args[0]
))
sys.exit(1)
if not modwsgi_compat:
if not hasattr(handlermod, "wmain"):
sys.exit(1)
if not modwsgi_compat:
if not hasattr(handlermod, "wmain"):