From f292e8fc5bac5fd1a3e1158c2a34d81ebb650801 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sat, 26 Mar 2016 14:06:43 +0100 Subject: [PATCH] Add generic login failed message --- management/daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/management/daemon.py b/management/daemon.py index 690f8b0f..5400925f 100755 --- a/management/daemon.py +++ b/management/daemon.py @@ -43,7 +43,7 @@ def authorized_personnel_only(viewfunc): except ValueError as e: # Authentication failed. privs = [] - error = str(e) + error = "Incorrect username or password" # Authorized to access an API view? if "admin" in privs: @@ -119,7 +119,7 @@ def me(): except ValueError as e: return json_response({ "status": "invalid", - "reason": str(e), + "reason": "Incorrect username or password", }) resp = {