

def _build_css_path(self, prefix=''):
    "\n        Constructs a relative path from a given prefix within the container.\n        URLs and paths starting with '/' are not modified.\n\n        :param prefix: The prefix for the container listing.\n        "
    if self._listings_css.startswith(('/', 'http://', 'https://')):
        css_path = quote(self._listings_css, ':/')
    else:
        css_path = (('../' * prefix.count('/')) + quote(self._listings_css))
    return css_path

dataset/ETHPy150Open openstack/swift/swift/common/middleware/staticweb.py _StaticWebContext._build_css_path/original