summaryrefslogtreecommitdiff
path: root/src/mailman
diff options
context:
space:
mode:
authorBarry Warsaw2009-05-11 23:00:30 -0400
committerBarry Warsaw2009-05-11 23:00:30 -0400
commit25a3786da9d299a52d82d8b884a9ecb6e2b2cf39 (patch)
tree32d45198c37462866d8b3e422ce52d7ad9e452a2 /src/mailman
parent65de4becab9d8b02bef6ba20a2f17977be986227 (diff)
downloadmailman-25a3786da9d299a52d82d8b884a9ecb6e2b2cf39.tar.gz
mailman-25a3786da9d299a52d82d8b884a9ecb6e2b2cf39.tar.zst
mailman-25a3786da9d299a52d82d8b884a9ecb6e2b2cf39.zip
A little bit of cleanup.
Diffstat (limited to '')
-rw-r--r--src/mailman/rest/testing/server.py3
-rw-r--r--src/mailman/rest/urls.py6
2 files changed, 2 insertions, 7 deletions
diff --git a/src/mailman/rest/testing/server.py b/src/mailman/rest/testing/server.py
index d1799d0c2..35a3f2b72 100644
--- a/src/mailman/rest/testing/server.py
+++ b/src/mailman/rest/testing/server.py
@@ -52,8 +52,7 @@ class TestableServer:
def stop(self):
"""Stop the server by firing the event."""
self.event.set()
- # Fire off one more request so the handle_request() will exit. XXX
- # Should we set a .timeout on the server instead?
+ # Fire off one more request so the handle_request() will exit.
fp = urlopen('http://localhost:8001/3.0/system')
fp.close()
self.thread.join()
diff --git a/src/mailman/rest/urls.py b/src/mailman/rest/urls.py
index 384c21dba..cdd921d4e 100644
--- a/src/mailman/rest/urls.py
+++ b/src/mailman/rest/urls.py
@@ -45,22 +45,18 @@ class AbsoluteURLMapper:
"""Initialize with respect to a context and request."""
self.context = context
self.request = request
- # XXX Is this strictly necessary?
self.webservice_config = AdminWebServiceConfiguration()
self.version = self.webservice_config.service_version_uri_prefix
self.schema = ('https' if self.webservice_config.use_https else 'http')
self.hostname = config.webservice.hostname
self.port = int(config.webservice.port)
- def __str__(self):
+ def __call__(self):
"""Return the semi-hard-coded URL to the service root."""
path = self._lookup(self.context)
return '{0.schema}://{0.hostname}:{0.port}/{0.version}/{1}'.format(
self, path)
- # XXX Is this strictly necessary?
- __call__ = __str__
-
def _lookup(self, ob):
"""Return the path component for the object.