-
Notifications
You must be signed in to change notification settings - Fork 1
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
Moving to Py3 #101
Moving to Py3 #101
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment on one odd change. Otherwise okay.
.travis.yml
Outdated
@@ -14,7 +14,7 @@ env: | |||
- FLASK_ENV=TESTING | |||
language: python | |||
python: | |||
- 2.7 | |||
- 3.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3.7
imgee/utils.py
Outdated
@@ -303,9 +303,8 @@ def is_animated_gif(local_path): | |||
|
|||
def get_file_type(fp, filename=None): | |||
fp.seek(0) | |||
data = fp.read(1024) # https://github.com/ahupp/python-magic#usage | |||
result = magic.from_buffer(fp.read(), mime=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't there a specific reason to read only the first 1024 bytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs now recommend 2048.
Related to hasgeek/hgapp#39