diff options
| author | Barry Warsaw | 2016-01-13 11:16:38 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2016-01-13 11:16:38 -0500 |
| commit | 98c074f19492d81ebf5b5c3f4d4f2210aa56230d (patch) | |
| tree | 8a04bc455fe21065c38ccd05e3141d3f24d0d816 /src/mailman/rest/helpers.py | |
| parent | d75a7ebb46279f341b498bf517d07e9ae4c27f0a (diff) | |
| download | mailman-98c074f19492d81ebf5b5c3f4d4f2210aa56230d.tar.gz mailman-98c074f19492d81ebf5b5c3f4d4f2210aa56230d.tar.zst mailman-98c074f19492d81ebf5b5c3f4d4f2210aa56230d.zip | |
Diffstat (limited to 'src/mailman/rest/helpers.py')
| -rw-r--r-- | src/mailman/rest/helpers.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mailman/rest/helpers.py b/src/mailman/rest/helpers.py index 425164ef7..135d950ac 100644 --- a/src/mailman/rest/helpers.py +++ b/src/mailman/rest/helpers.py @@ -32,7 +32,6 @@ __all__ = [ 'no_content', 'not_found', 'okay', - 'path_to', ] @@ -48,27 +47,6 @@ from pprint import pformat -def path_to(resource, api_version): - """Return the url path to a resource. - - :param resource: The canonical path to the resource, relative to the - system base URI. - :type resource: string - :param api_version: API version to report. - :type api_version: string - :return: The full path to the resource. - :rtype: bytes - """ - return '{0}://{1}:{2}/{3}/{4}'.format( - ('https' if as_boolean(config.webservice.use_https) else 'http'), - config.webservice.hostname, - config.webservice.port, - api_version, - (resource[1:] if resource.startswith('/') else resource), - ) - - - class ExtendedEncoder(json.JSONEncoder): """An extended JSON encoder which knows about other data types.""" @@ -185,9 +163,6 @@ class CollectionMixin: result['entries'] = entries return result - def path_to(self, resource): - return path_to(resource, self.api.version) - class GetterSetter: |
