X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=python%2Fscgi-wsgi;h=9befb255c6a5a2d2b5353f4753007fd0d94f2e72;hb=55fa3f634594cedabf75182bd6404463c091ff63;hp=006f3757d068d5199c900f5dd4b18a3b4acbe172;hpb=adb11d5f566968a0a12fcd225b5748bce09e0014;p=ashd.git diff --git a/python/scgi-wsgi b/python/scgi-wsgi index 006f375..9befb25 100755 --- a/python/scgi-wsgi +++ b/python/scgi-wsgi @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 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: - bindhost = "hostname" + bindhost = "localhost" bindport = int(a) else: bindhost = a[:p] @@ -41,8 +41,8 @@ if sk is None: 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"):