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

Missing icons #95

Merged
merged 2 commits into from
Feb 2, 2015
Merged

Missing icons #95

merged 2 commits into from
Feb 2, 2015

Conversation

madflow
Copy link

@madflow madflow commented Jan 16, 2015

This is a possible fix for #85. The problem seems to be twofold:

  1. Downloading the assets from the server with requests.get(asset_url, verify=False).text seemed to bail on .woff etc files (wrong file size)
  2. The generic <path:filename> route did not match the icons url.

This is a typical "works for me" hack - maybe it does some good ;)

# Write file and show message
_write_file(filename, contents)
# Retrieve file and show message
urlretrieve(asset_url, filename)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this more robust than using requests and writing to a file?

Requests handles things like following redirects for you.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, I just read your description.

What was causing the "wrong file size"? Was it requests, or the _write_file? If it's _write_file, that should probably be fixed instead of worked around so that other uses of function don't fail.

@joeyespo
Copy link
Owner

joeyespo commented Feb 2, 2015

Just tested it and it works. Nice job! Thanks for the fix, @madflow!

joeyespo added a commit that referenced this pull request Feb 2, 2015
@joeyespo joeyespo merged commit 5e97c0c into joeyespo:master Feb 2, 2015
@madflow madflow deleted the missing-icons branch February 2, 2015 21:22
@joeyespo joeyespo mentioned this pull request Feb 6, 2015
@qn7o
Copy link

qn7o commented Feb 6, 2015

This is great, thanks !

@joeyespo joeyespo added this to the 3.1 milestone Feb 7, 2015
@joeyespo
Copy link
Owner

joeyespo commented Feb 9, 2015

Just released a new version with your fix. Be sure to pip install --upgrade grip, and thanks again!

@madflow
Copy link
Author

madflow commented Feb 9, 2015

👍 Thanks for the merge . Let's see which new bugs I introduced with this :D

@joeyespo
Copy link
Owner

joeyespo commented Feb 9, 2015

@madflow 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants