From 241d682d65a5b0f2f2de5189d7c925867408fcb9 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. --- src/leap/bonafide/service.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/leap/bonafide/service.py b/src/leap/bonafide/service.py index 4d5ee78..ff3c30a 100644 --- a/src/leap/bonafide/service.py +++ b/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