diff options
author | Ruben Pollan <meskio@sindominio.net> | 2016-05-19 13:32:43 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2016-05-19 13:32:43 +0200 |
commit | fff8b5be74105d95a8b556e06b1e99cd7743749b (patch) | |
tree | 1dc1525d47a0a3fb617157d3dc8f6237a349913f /bonafide/src | |
parent | 78de4ce3aada7e5c40880175544d679f0228a670 (diff) |
[bug] raise exception on authentiation errors
To avoid using None as a valid (token, uuid) pair we need to raise an
exception.
Diffstat (limited to 'bonafide/src')
-rw-r--r-- | bonafide/src/leap/bonafide/service.py | 5 |
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, |