summaryrefslogtreecommitdiff
path: root/web-server/opendc/util/rest.py
diff options
context:
space:
mode:
authorGeorgios Andreadis <info@gandreadis.com>2020-06-30 13:28:18 +0200
committerFabian Mastenbroek <mail.fabianm@gmail.com>2020-08-24 19:42:28 +0200
commit9f87ab4bbab048b527585929135cab80fafd9ef9 (patch)
tree835e41c1660ab12a2f3299049d2e15f8495d3b4b /web-server/opendc/util/rest.py
parent5c673272747ed14e5668b2f4301f0f853b400ee1 (diff)
Address a number of pylint issues
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