summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index 6fb0dc0..7606d8b 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -142,20 +142,14 @@ class ogThread():
client.send(response.get())
def setup(client, request, ogRest):
- listconfig = []
-
try:
- listconfig = ogOperations.setup(request, ogRest)
+ out = ogOperations.setup(request, ogRest)
except ValueError as err:
response = restResponse(ogResponses.INTERNAL_ERR)
client.send(response.get())
return
- jsonResp = jsonResponse()
- jsonResp.addElement('disk', request.getDisk())
- jsonResp.addElement('cache', request.getCache())
- jsonResp.addElement('cache_size', request.getCacheSize())
- jsonResp.addElement('partition_setup', listconfig)
+ jsonResp = jsonResponse(out)
response = restResponse(ogResponses.OK, jsonResp)
client.send(response.get())