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

store: download without login #903

Merged

Conversation

sergiusens
Copy link
Collaborator

LP: #1606903

Signed-off-by: Sergio Schvezov sergio.schvezov@ubuntu.com

LP: #1606903

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
@@ -372,7 +374,8 @@ def get_package(self, snap_name, channel, arch=None):
def get(self, url, headers=None, params=None, stream=False):
if headers is None:
headers = {}
headers.update({'Authorization': _macaroon_auth(self.conf)})
with contextlib.suppress(errors.InvalidCredentialsError):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you explain this supress?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We cannot assume all requests require a login, can we? We already have the with login guard on every call that requires one. If you are not logged in there is no need to _macaroon_auth

@sergiusens sergiusens merged commit 603948e into canonical:master Nov 15, 2016
@sergiusens sergiusens deleted the bugfix/1606903/download-no-login branch November 15, 2016 16:33
kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017
LP: #1606903

Signed-off-by: Sergio Schvezov <sergio.schvezov@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants