-
Notifications
You must be signed in to change notification settings - Fork 21
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
Allow password keyword to Client #21
Conversation
@@ -20,6 +20,12 @@ class PubSubClient(Client): | |||
""" | |||
|
|||
def call(self, *args, **kwargs): | |||
if args[0] == 'AUTH': |
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.
I think it would be better to use "_call()" in the connect() method (instead on "call()").
This test would be useless
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.
Agreed
can you provide an additional test ? |
raise tornado.gen.Return(connection_status) | ||
|
||
authentication_status = yield self.call('AUTH', self.password) | ||
if authentication_status == 'OK': |
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.
probably b"OK" would be better (python3 compatibility)
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.
Agreed
|
I have added updates. I tried making some tests for this using requirepass but it has no effect. Although I have manually tested it and it works |
Allow password keyword to Client
Sorry to re-open this. Seems like passing the password from a Pool does not work:
raises:
|
Also allows to subclasses, including PubsubClient.
Fixes #20