aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/tools/routing.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2013-04-18 15:53:09 +0200
committerElrond <elrond+mediagoblin.org@samba-tng.org>2013-04-18 16:14:16 +0200
commitbc92ff9d3cc1e4b4aadbd7728f52f2829178e699 (patch)
tree92d41a60341ef33fd136b35393c1bfe9dc39fe22 /mediagoblin/tools/routing.py
parent4c7b9420ab6bf0d979007bcf4e63106404b059be (diff)
downloadmediagoblin-bc92ff9d3cc1e4b4aadbd7728f52f2829178e699.tar.lz
mediagoblin-bc92ff9d3cc1e4b4aadbd7728f52f2829178e699.tar.xz
mediagoblin-bc92ff9d3cc1e4b4aadbd7728f52f2829178e699.zip
Start to use six for basestring.
six allows us to smoothly get more forward compatible with py3. The idea is to change things over to use six, when/if we feel a need for it.
Diffstat (limited to 'mediagoblin/tools/routing.py')
-rw-r--r--mediagoblin/tools/routing.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/tools/routing.py b/mediagoblin/tools/routing.py
index 791cd1e6..a15795fe 100644
--- a/mediagoblin/tools/routing.py
+++ b/mediagoblin/tools/routing.py
@@ -16,6 +16,7 @@
import logging
+import six
from werkzeug.routing import Map, Rule
from mediagoblin.tools.common import import_component
@@ -43,7 +44,7 @@ def endpoint_to_controller(rule):
_log.debug('endpoint: {0} view_func: {1}'.format(endpoint, view_func))
# import the endpoint, or if it's already a callable, call that
- if isinstance(view_func, basestring):
+ if isinstance(view_func, six.string_types):
view_func = import_component(view_func)
rule.gmg_controller = view_func