summaryrefslogtreecommitdiffstats
path: root/src/ogRest.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ogRest.py')
-rw-r--r--src/ogRest.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ogRest.py b/src/ogRest.py
index ff9cccb..c50adfa 100644
--- a/src/ogRest.py
+++ b/src/ogRest.py
@@ -201,6 +201,9 @@ class ogThread():
ogRest.state = ThreadState.IDLE
return
+ kibi = 1024
+ datasize = int(image_info['datasize']) * kibi
+
json_body = jsonBody()
json_body.add_element('disk', request.getDisk())
json_body.add_element('partition', request.getPartition())
@@ -212,7 +215,7 @@ class ogThread():
json_body.add_element('clonator', image_info['clonator'])
json_body.add_element('compressor', image_info['compressor'])
json_body.add_element('filesystem', image_info['filesystem'])
- json_body.add_element('datasize', int(image_info['datasize']))
+ json_body.add_element('datasize', datasize)
response = restResponse(ogResponses.OK, json_body)
client.send(response.get())