Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: multiplexer.fcgi

Issue 4826294168584192: Issue 2249 - Support UDP sockets in multiplexer.fcgi (Closed)
Patch Set: Created March 31, 2015, 7:02 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: multiplexer.fcgi
diff --git a/multiplexer.fcgi b/multiplexer.fcgi
index d72b2c18a6d7e04b211354ec3a3e38895f74ed65..34019b821e032080445c0968f2ac4b99a2eaaa57 100755
--- a/multiplexer.fcgi
+++ b/multiplexer.fcgi
@@ -21,10 +21,12 @@ from flup.server.fcgi import WSGIServer
from sitescripts.web import multiplex
-bindAddress = None
-if 'FCGI_BIND_ADDRESS' in os.environ:
- match = re.match(r'^(.*?):(\d+)$', os.environ['FCGI_BIND_ADDRESS'])
- bindAddress = (match.group(1), int(match.group(2)))
+bindAddress = os.environ.get('FCGI_BIND_ADDRESS', None)
Sebastian Noack 2015/04/01 07:43:27 Nit: .get() defaults to None anyway. So there is n
mathias 2015/04/01 08:03:11 Done.
+if bindAddress:
+ match = re.match(r'^(.*?):(\d+)$', bindAddress)
Sebastian Noack 2015/04/01 07:43:27 Didn't we agree to don't use re.match() anymore in
Sebastian Noack 2015/04/01 08:01:34 What's about this?
mathias 2015/04/01 08:03:11 Frankly I have no idea what you mean by that. What
Sebastian Noack 2015/04/01 08:11:27 I'm talking about this discussion: http://coderevi
+ if match:
+ bindAddress = (match.group(1), int(match.group(2)))
+
srv = WSGIServer(multiplex, debug=False, bindAddress=bindAddress)
if __name__ == '__main__':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld