summaryrefslogtreecommitdiff
path: root/paste/urlparser.py
diff options
context:
space:
mode:
authorCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:02 +0100
committerCyril Roelandt <cyril.roelandt@enovance.com>2014-03-18 12:47:02 +0100
commit4262b41da195cb959abf4a5a06ce34a6dec2c4a3 (patch)
treecb6a9ef83ac83e6e6e0a90dd48ad9672b4e32a9d /paste/urlparser.py
parent3f98341a08e2899fdf6914776198bd0878e4f5c2 (diff)
downloadpaste-4262b41da195cb959abf4a5a06ce34a6dec2c4a3.tar.gz
Python 3: Use six types for strings
* Replace (str, unicode) with (six.binary_type, six.text_type) * Replace basestring with (six.binary_type, six.text_type)
Diffstat (limited to 'paste/urlparser.py')
-rw-r--r--paste/urlparser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/urlparser.py b/paste/urlparser.py
index 3554a98..19bcbac 100644
--- a/paste/urlparser.py
+++ b/paste/urlparser.py
@@ -5,6 +5,7 @@ WSGI applications that parse the URL and dispatch to on-disk resources
"""
import os
+import six
import sys
import imp
import mimetypes
@@ -525,7 +526,7 @@ class PkgResourcesParser(StaticURLParser):
def __init__(self, egg_or_spec, resource_name, manager=None, root_resource=None):
if pkg_resources is None:
raise NotImplementedError("This class requires pkg_resources.")
- if isinstance(egg_or_spec, (str, unicode)):
+ if isinstance(egg_or_spec, (six.binary_type, six.text_type)):
self.egg = pkg_resources.get_distribution(egg_or_spec)
else:
self.egg = egg_or_spec