Skip to content

Commit

Permalink
Have _verify_session raise NotConnectedError
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Jul 2, 2024
1 parent d362882 commit 01b18e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/zinolib/controllers/zino1.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,11 @@ def _verify_session(self, quiet=False):
if not getattr(self.session, 'request', None):
if quiet:
return False
raise ValueError
raise NotConnectedError("The request socket have not been set up correctly. Reconnect necessary.")

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

View check run for this annotation

Codecov / codecov/patch

src/zinolib/controllers/zino1.py#L526

Added line #L526 was not covered by tests
if not self.session.request.connected:
if quiet:
return False
raise NotConnectedError("Authentication necessary")

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

View check run for this annotation

Codecov / codecov/patch

src/zinolib/controllers/zino1.py#L528-L530

Added lines #L528 - L530 were not covered by tests
return True

@classmethod
Expand Down

0 comments on commit 01b18e9

Please sign in to comment.