summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapi.py6
-rwxr-xr-xcurl.sh2
2 files changed, 3 insertions, 5 deletions
diff --git a/api.py b/api.py
index 972b334..54e7da3 100755
--- a/api.py
+++ b/api.py
@@ -130,9 +130,7 @@ class AccessCheckerPlugin:
logging.debug('authz_needed: %r', authz_needed)
if authz_needed:
logging.debug('checking if access is allowed: %r', scopes)
- x = self._checker.access_is_allowed(r.headers, scopes)
- logging.debug('x: %r', x)
- if not x:
+ if not self._checker.access_is_allowed(r.headers, scopes):
logging.error('Request denied %s %s', r.method, r.path)
return bottle.HTTPError(400)
@@ -144,7 +142,7 @@ class AccessCheckerPlugin:
logging.error(
'Could not handle request: %s %s: %s',
r.method, r.path, str(e))
- raise bottle.HTTPError(500)
+ return bottle.HTTPError(500)
return access_checker_wrapper
diff --git a/curl.sh b/curl.sh
index c4ff163..5f9fc61 100755
--- a/curl.sh
+++ b/curl.sh
@@ -29,7 +29,7 @@ case "$cmd" in
deploy)
runcurl -sv -X POST --data-binary @"$1" \
- -H "Content-Type: application/octet-stream" \
+ -H "Content-Type: application/json" \
https://wmf2-deployer.vm.liw.fi/publish
;;