Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed setup.py reading requirement strings as bytes() #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion flask_store/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
* Amazon Simple File Storage (requires ``boto`` to be installed)
"""

import urlparse
try:
import urlparse
except ImportError:
import urllib.parse as urlparse

from flask import current_app, send_from_directory
from flask_store.exceptions import NotConfiguredError
Expand Down
5 changes: 4 additions & 1 deletion flask_store/providers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

import os
import shortuuid
import urlparse
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
Expand Down
2 changes: 1 addition & 1 deletion flask_store/providers/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def app_defaults(app):

# For Local file storage the default store path is the current
# working directory
app.config.setdefault('STORE_PATH', os.getcwdu())
app.config.setdefault('STORE_PATH', os.getcwd())

# Default URL Prefix
app.config.setdefault('STORE_URL_PREFIX', '/uploads')
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def read_requirements(filename):
line = line.strip()
if not line or line.startswith(b'#') or line == '':
continue
if isinstance(line, bytes):
line = line.decode()
requirements.append(line)
except IOError:
warnings.warn('{0} was not found'.format(filename))
Expand Down