Make 'scgi' package optional.

Add try/except around 'scgi' import so we don't require it.
This commit is contained in:
Neil Schemenauer 2016-09-12 17:01:39 +00:00
parent cb788a75c8
commit 7a7abbc30a
1 changed files with 5 additions and 1 deletions

View File

@ -9,7 +9,11 @@ import urllib.request, urllib.parse, urllib.error
import quixote
from quixote import get_publisher
from quixote.util import import_object
from scgi.systemd_socket import get_systemd_socket
try:
from scgi.systemd_socket import get_systemd_socket
except ImportError:
def get_systemd_socket():
return None
class SockInheritHTTPServer(HTTPServer):