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

Fix use of GalaxyClient with username/password on py3 #251

Merged
merged 1 commit into from
Sep 14, 2017

Conversation

mvdbeek
Copy link
Member

@mvdbeek mvdbeek commented Sep 14, 2017

No description provided.

@@ -201,7 +201,7 @@ def make_put_request(self, url, payload=None, params=None):
@property
def key(self):
if not self._key and self.email is not None and self.password is not None:
unencoded_credentials = "%s:%s" % (self.email, self.password)
unencoded_credentials = b"%s:%s" % (self.email, self.password)
Copy link
Member

Choose a reason for hiding this comment

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

This raises an exception for me:
TypeError: unsupported operand type(s) for %: 'bytes' and 'tuple'

what about modifying the next line instead to:

authorization = base64.b64encode(unencoded_credentials.encode())

Copy link
Member Author

Choose a reason for hiding this comment

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

I could have sworn I tested this under py3 as well :).

@mvdbeek
Copy link
Member Author

mvdbeek commented Sep 14, 2017

I've rebased the commit with the right fix.

@nsoranzo nsoranzo merged commit 82f83c7 into galaxyproject:master Sep 14, 2017
@nsoranzo
Copy link
Member

Thanks @mvdbeek!

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.

2 participants