diff options
author | Helmut Grohne <helmut@subdivi.de> | 2012-11-01 10:41:59 +0100 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2012-11-01 10:41:59 +0100 |
commit | 1bb2218f854e86229b76576850711c90a38a0bc9 (patch) | |
tree | 82c092ca51754981e5993a280abdf8cb8748bee7 /wsgitools/scgi | |
parent | 11e1fd2b0d9f2b46eb2e6a1f4cb985ec7d0d0e01 (diff) | |
download | wsgitools-1bb2218f854e86229b76576850711c90a38a0bc9.tar.gz |
scgi.forkpool: reduce instance attributes
The interface and port attributes are always used together. Combine them
in order to reduce complexity.
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r-- | wsgitools/scgi/forkpool.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py index cdd50f0..64d93ef 100644 --- a/wsgitools/scgi/forkpool.py +++ b/wsgitools/scgi/forkpool.py @@ -206,8 +206,7 @@ class SCGIServer: """ assert hasattr(error, "write") self.wsgiapp = wsgiapp - self.port = port - self.interface = interface + self.bind_address = (interface, port) self.minworkers = minworkers self.maxworkers = maxworkers self.maxrequests = maxrequests @@ -237,7 +236,7 @@ class SCGIServer: if self.reusesocket is None: self.server = socket.socket() self.server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - self.server.bind((self.interface, self.port)) + self.server.bind(self.bind_address) self.server.listen(5) else: self.server = self.reusesocket |