From 020eeb2441522b312e21e231a52e206010d43e7a Mon Sep 17 00:00:00 2001 From: TOW Date: Fri, 29 Mar 2019 06:14:27 -0300 Subject: Arreglado fallback a CGI en Windows --- cgi/fcgi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cgi/fcgi.py b/cgi/fcgi.py index 8677679..e59f8c8 100644 --- a/cgi/fcgi.py +++ b/cgi/fcgi.py @@ -987,10 +987,12 @@ class Server(object): isFCGI = True if isFCGI: - sock = socket.fromfd(FCGI_LISTENSOCK_FILENO, socket.AF_INET, - socket.SOCK_STREAM) try: + sock = socket.fromfd(FCGI_LISTENSOCK_FILENO, socket.AF_INET, + socket.SOCK_STREAM) sock.getpeername() + except AttributeError: + isFCGI = False except socket.error, e: if e[0] == errno.ENOTSOCK: # Not a socket, assume CGI context. -- cgit v1.2.1-18-gbd029