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

Messages Wrong Way Round? #109

Open
ldo opened this issue Nov 9, 2022 · 0 comments
Open

Messages Wrong Way Round? #109

ldo opened this issue Nov 9, 2022 · 0 comments

Comments

@ldo
Copy link

ldo commented Nov 9, 2022

Minor thing, but it seems to me that the message “not able to reconnect” should happen if there is already a connection, and “not able to connect” if there isn’t one, not vice versa.

diff --git a/panoramisk/manager.py b/panoramisk/manager.py
index 29e12ce..41c2032 100644
--- a/panoramisk/manager.py
+++ b/panoramisk/manager.py
@@ -65,10 +65,10 @@ class Manager:
             transport, protocol = f.result()
         except OSError:  # pragma: no cover
             if self._connected:
-                self.log.exception('Not able to connect')
+                self.log.warning('Not able to reconnect')
                 self._connected = False
             else:
-                self.log.warning('Not able to reconnect')
+                self.log.warning('Not able to connect')
             self.loop.call_later(self.reconnect_timeout, self.connect)
         else:
             self._connected = True

I made both warning-messages; do you want one or both to be exception instead?

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

No branches or pull requests

1 participant