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
commitfff8b5be74105d95a8b556e06b1e99cd7743749b (patch)
tree1dc1525d47a0a3fb617157d3dc8f6237a349913f
parent78de4ce3aada7e5c40880175544d679f0228a670 (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--bonafide/src/leap/bonafide/service.py5
1 files 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,