-
-
Notifications
You must be signed in to change notification settings - Fork 409
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
Refactor connector opsdroid pointer #725
Comments
I will try to work on this. |
This would be my first contribution to a project so I'm a little unsure of the protocol, should I also update the connector tests to reflect this change? |
Hello @zonagilreath welcome to the project! Let us know if you need any help 👍 |
Might be a good idea to add the opsdroid kwarg to the database class as well - this is related to the bug report of @colonelkrud colonelkrud INFO opsdroid.core: Received stop signal, exiting. INFO opsdroid.core: Removing skills...
INFO opsdroid.core: Stopping database ...
ERROR opsdroid.core: Caught exception
ERROR opsdroid.core: {
'message': 'Task exception was never retrieved',
'exception': TypeError('disconnect() takes 1 positional argument but 2 were given',),
'future': <Task finished coro=<OpsDroid.handle_signal() done, defined at /usr/local/lib/python3.6/dist-packages/opsdroid/core.py:120>
exception=TypeError('disconnect() takes 1 positional argument but 2 were given',)>} |
Yes! |
Sounds good, I'll checkout the db class once I get the connector tests fixed. |
Oh also, since the issue said "Add opsdroid as a kwarg" I'm adding it as a keyword-only arg and it won't be possible to supply it positionally. Is this what is desired? |
Currently in the
Connector
class we expect opsdroid to pass a pointer to itself onconnect
anddisconnect
. This seems a little pointless as the connector should be storing the pointer as an attribute anyway.Steps
opsdroid
as a kwarg in the__init__
method of theConnector
class and store it as an attribute.connect
anddisconnect
method as they are no longer needed.The text was updated successfully, but these errors were encountered: