summaryrefslogtreecommitdiff
path: root/src/wsgi.py
diff options
context:
space:
mode:
authorKristofer Hallin <kristofer@sunet.se>2021-10-01 10:21:54 +0200
committerKristofer Hallin <kristofer@sunet.se>2021-10-01 10:21:54 +0200
commitcb47680777b3fd3bcd955f9e81ddf45c9b69ecfa (patch)
tree1fa8dfae5e9f39c634498f2c60b56a99558cae9a /src/wsgi.py
parent0398e77a809abcaf78c6f7d3e6064a5bee50be23 (diff)
* Use py-couchdb.
* Other minor fixes and tweaks.
Diffstat (limited to 'src/wsgi.py')
-rwxr-xr-xsrc/wsgi.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wsgi.py b/src/wsgi.py
index 49c1c17..15f9224 100755
--- a/src/wsgi.py
+++ b/src/wsgi.py
@@ -2,13 +2,13 @@
import os
import sys
-from wsgiref.simple_server import make_server
-import falcon
import json
+import authn
+import falcon
+
from db import DictDB
from base64 import b64decode
-
-import authn
+from wsgiref.simple_server import make_server
class CollectorResource():
@@ -36,9 +36,9 @@ class CollectorResource():
class EPGet(CollectorResource):
def on_get(self, req, resp):
+ out = []
resp.status = falcon.HTTP_200
resp.content_type = falcon.MEDIA_JSON
- out = []
orgs = self.user_auth(req.auth, self._users.read_perms)
if not orgs:
@@ -46,7 +46,7 @@ class EPGet(CollectorResource):
resp.text = 'Invalid username or password\n'
return
- # We really should rely on req.params in its pure form since
+ # We really shouldn't rely on req.params in its pure form since
# it might contain garbage.
selectors = req.params