summaryrefslogtreecommitdiff
path: root/src/mailman/rest/urls.py
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/rest/urls.py
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/urls.py6
1 files changed, 1 insertions, 5 deletions
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.