From fff8b5be74105d95a8b556e06b1e99cd7743749b Mon Sep 17 00:00:00 2001 From: Ruben Pollan Date: Thu, 19 May 2016 13:32:43 +0200 Subject: [bug] raise exception on authentiation errors To avoid using None as a valid (token, uuid) pair we need to raise an exception. --- bonafide/src/leap/bonafide/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bonafide/src/leap/bonafide/service.py b/bonafide/src/leap/bonafide/service.py index 4d5ee78..ff3c30a 100644 --- a/bonafide/src/leap/bonafide/service.py +++ b/bonafide/src/leap/bonafide/service.py @@ -59,8 +59,9 @@ class BonafideService(HookableService): def notify_bonafide_auth(result): if not result: - log.msg("Authentication hook did not return anything") - return + msg = "Authentication hook did not return anything" + log.msg(msg) + raise RuntimeError(msg) token, uuid = result data = dict(username=username, token=token, uuid=uuid, -- cgit v1.2.3