diff options
Diffstat (limited to 'mediagoblin/tools/routing.py')
-rw-r--r-- | mediagoblin/tools/routing.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/tools/routing.py b/mediagoblin/tools/routing.py index a2c89f2a..1c360bff 100644 --- a/mediagoblin/tools/routing.py +++ b/mediagoblin/tools/routing.py @@ -44,17 +44,17 @@ class MGRoute(Rule): if not (self.match_slash or path.endswith("/")): path = path + "/" - return super(MGRoute, self).match(path, *args, **kwargs) + return super().match(path, *args, **kwargs) def endpoint_to_controller(rule): endpoint = rule.endpoint view_func = rule.gmg_controller - _log.debug('endpoint: {0} view_func: {1}'.format(endpoint, view_func)) + _log.debug('endpoint: {} view_func: {}'.format(endpoint, view_func)) # import the endpoint, or if it's already a callable, call that - if isinstance(view_func, six.string_types): + if isinstance(view_func, str): view_func = import_component(view_func) rule.gmg_controller = view_func @@ -73,7 +73,7 @@ def mount(mountpoint, routes): Mount a bunch of routes to this mountpoint """ for endpoint, url, controller in routes: - url = "%s/%s" % (mountpoint.rstrip('/'), url.lstrip('/')) + url = "{}/{}".format(mountpoint.rstrip('/'), url.lstrip('/')) add_route(endpoint, url, controller) def extract_url_arguments(url, urlmap): |