Skip to content

Commit

Permalink
Raise NotConnectedError in UpdateHandler.check_connection
Browse files Browse the repository at this point in the history
… instead of AttributeError when something nasty has happened to the
session object.
  • Loading branch information
hmpf committed Jul 3, 2024
1 parent f13d7ad commit 0a1e7e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/zinolib/controllers/zino1.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ def connect(self):
self.check_connection()

def check_connection(self):
self.manager._verify_session()

Check warning on line 160 in src/zinolib/controllers/zino1.py

View check run for this annotation

Codecov / codecov/patch

src/zinolib/controllers/zino1.py#L160

Added line #L160 was not covered by tests
if self.manager.session.push._sock.fileno() >= 0:
self._connected = True
return True
Expand Down

0 comments on commit 0a1e7e8

Please sign in to comment.