aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/token.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-10-16 11:21:33 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-10-16 11:21:33 +0200
commitb82de5ea7b03a83f8118cd5449e168ef06e8ccf7 (patch)
tree520ae29dbddde47e0aab677a619bedf1d4954b27 /app/handlers/token.py
parent1a7c8d3214c188e50232a1901a0b37e20ec53a74 (diff)
handlers: Make instance method into static one, refactor.
* Turn _valid_keys into a static method for all handlers. * Use in batch handlers the valid keys defined in common. * Change the JSON serializer using the default one, and change how mongodb Cursor results are stored (should be slightly faster). Change-Id: I17cf26d9011e34125bf6873edda7179a5202aa39
Diffstat (limited to 'app/handlers/token.py')
-rw-r--r--app/handlers/token.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/handlers/token.py b/app/handlers/token.py
index f73ab73..014f8a9 100644
--- a/app/handlers/token.py
+++ b/app/handlers/token.py
@@ -63,7 +63,8 @@ class TokenHandler(BaseHandler):
def collection(self):
return self.db[TOKEN_COLLECTION]
- def _valid_keys(self, method):
+ @staticmethod
+ def _valid_keys(method):
return TOKEN_VALID_KEYS.get(method, None)
@protected_th("GET")