summaryrefslogtreecommitdiff
path: root/web-server/opendc/util/rest.py
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-06-30 14:12:07 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:43:10 +0200
commit66b2d85385d05abb590535da60341876ecdbab71 (patch)
tree0656f64a4179d419adac86e488e21def7a7fa2b8 /web-server/opendc/util/rest.py
parent88d8a9cbeae3466230db6bd13120bd4438abbc66 (diff)
parentc99ef7504a1374170f88b89faeb7e6dec6a55253 (diff)
Merge changes with upstream
Diffstat (limited to 'web-server/opendc/util/rest.py')
-rw-r--r--web-server/opendc/util/rest.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/web-server/opendc/util/rest.py b/web-server/opendc/util/rest.py
index dc5478de..abd2f3de 100644
--- a/web-server/opendc/util/rest.py
+++ b/web-server/opendc/util/rest.py
@@ -1,7 +1,6 @@
import importlib
import json
import os
-import sys
from oauth2client import client, crypt
@@ -9,7 +8,7 @@ from opendc.util import exceptions, parameter_checker
from opendc.util.exceptions import ClientError
-class Request(object):
+class Request:
"""WebSocket message to REST request mapping."""
def __init__(self, message=None):
""""Initialize a Request from a socket message."""
@@ -122,11 +121,12 @@ class Request(object):
return id_info['sub']
-class Response(object):
+class Response:
"""Response to websocket mapping"""
def __init__(self, status_code, status_description, content=None):
"""Initialize a new Response."""
+ self.id = 0
self.status = {'code': status_code, 'description': status_description}
self.content = content