chiark / gitweb /
fix cfg_process_saddrs ServerAddr
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Apr 2017 00:46:07 +0000 (01:46 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 10 Apr 2017 00:46:07 +0000 (01:46 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
hippotatlib/__init__.py

index ab404fa..0c3577f 100644 (file)
@@ -449,12 +449,15 @@ def cfg_process_saddrs(c, ss):
         self._endpointfactory = twisted.internet.endpoints.TCP6ServerEndpoint
         self._inurl = b'[%s]'
     def make_endpoint(self):
-      return self._endpointfactory(reactor, self.port, self.addr)
+      return self._endpointfactory(reactor, self.port,
+                                   interface= '%s' % self.addr)
     def url(self):
       url = b'http://' + (self._inurl % str(self.addr).encode('ascii'))
       if self.port != 80: url += b':%d' % self.port
       url += b'/'
       return url
+    def __repr__(self):
+      return 'ServerAddr'+repr((self.port,self.addr))
 
   c.port = cfg.getint(ss,'port')
   c.saddrs = [ ]