summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index f9913c8..6fb0dc0 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -22,8 +22,11 @@ if platform.system() == 'Linux':
from src.linux import ogOperations
class jsonResponse():
- def __init__(self):
- self.jsontree = {}
+ def __init__(self, dictionary=None):
+ if dictionary:
+ self.jsontree = dictionary
+ else:
+ self.jsontree = {}
def addElement(self, key, value):
self.jsontree[key] = value
@@ -199,9 +202,7 @@ class ogThread():
client.send(response.get())
return
- jsonResp = jsonResponse()
- jsonResp.addElement('disk', out[0])
- jsonResp.addElement('partition_setup', out[1])
+ jsonResp = jsonResponse(out)
response = restResponse(ogResponses.OK, jsonResp)
client.send(response.get())