summaryrefslogtreecommitdiff
path: root/bottle.py
diff options
context:
space:
mode:
Diffstat (limited to 'bottle.py')
-rwxr-xr-xbottle.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bottle.py b/bottle.py
index 5ffa28d..045b462 100755
--- a/bottle.py
+++ b/bottle.py
@@ -1122,9 +1122,9 @@ def auth_required(check, realm='bottle-authentication'):
except (TypeError, AttributeError):
auth = False
else:
- try:
+ if callable(check):
auth = check(user, password)
- except TypeError:
+ else:
auth = False
if user in check and check[user] == password:
auth = True