diff --git a/flask_store/providers/__init__.py b/flask_store/providers/__init__.py index ed303f7..465e477 100644 --- a/flask_store/providers/__init__.py +++ b/flask_store/providers/__init__.py @@ -15,6 +15,10 @@ import os import shortuuid +try: + import urlparse +except ImportError: + import urllib.parse as urlparse from flask import current_app from flask_store.utils import is_path, path_to_uri diff --git a/setup.py b/setup.py index 4148f97..4d6d00f 100644 --- a/setup.py +++ b/setup.py @@ -59,7 +59,9 @@ def read_requirements(filename): line = line.strip() if not line or line.startswith(b'#') or line == '': continue - requirements.append(line.decode('utf-8')) + if isinstance(line, bytes): + line = line.decode() + requirements.append(line) except IOError: warnings.warn('{0} was not found'.format(filename))