From efa98d514c6a8b6670d808f2bddb7158a6741ff0 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Tue, 24 Apr 2012 14:58:18 +1200 Subject: Docs and comments for WSGI app example. --- libmproxy/wsgi.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'libmproxy') diff --git a/libmproxy/wsgi.py b/libmproxy/wsgi.py index 8844ea3e..9fb5f0c5 100644 --- a/libmproxy/wsgi.py +++ b/libmproxy/wsgi.py @@ -104,13 +104,17 @@ class WSGIAdaptor: except Exception, v: pass return errs.getvalue() - + class AppRegistry: def __init__(self): self.apps = {} def add(self, app, domain, port): + """ + Add a WSGI app to the registry, to be served for requests to the + specified domain, on the specified port. + """ self.apps[(domain, port)] = WSGIAdaptor(app, domain, port) def get(self, request): -- cgit v1.2.3