Skip to content

Messages Wrong Way Round? #109

@ldo

Description

@ldo

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions