summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2016-05-19 13:32:43 +0200
committerRuben Pollan <meskio@sindominio.net>2016-05-19 13:32:43 +0200
commit241d682d65a5b0f2f2de5189d7c925867408fcb9 (patch)
tree3934814100aa655eebb2a1b169f212e08280e011
parent1a22eed75e3440232cbdb7f65e04390e8ddd10c5 (diff)
[bug] raise exception on authentiation errors
To avoid using None as a valid (token, uuid) pair we need to raise an exception.
-rw-r--r--src/leap/bonafide/service.py5
1 files 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,