Skip to content

Commit

Permalink
Raise exception if cannot connect to push channel
Browse files Browse the repository at this point in the history
.. because we need a working request session in order to set up
a working push session.
  • Loading branch information
hmpf committed Jul 3, 2024
1 parent 0a1e7e8 commit 614f019
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zinolib/controllers/zino1.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ def connect_push_channel(session):
if session.request.connected and session.request.authenticated:
session.push = notifier(session.request)
session.push.connect() # ntie
return session
return session
raise NotConnectedError("Not connected tp request channel, so cannot connect to push channel")

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

View check run for this annotation

Codecov / codecov/patch

src/zinolib/controllers/zino1.py#L287-L288

Added lines #L287 - L288 were not covered by tests

@staticmethod
def authenticate(session, username=None, password=None):
Expand Down

0 comments on commit 614f019

Please sign in to comment.