summaryrefslogtreecommitdiffstats
path: root/src/live/ogOperations.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/live/ogOperations.py')
-rw-r--r--src/live/ogOperations.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index a8412c6..66f3024 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -478,6 +478,15 @@ class OgLiveOperations:
logging.exception('Exception when running "image create" subprocess')
raise ValueError('Error: Incorrect command value')
+ try:
+ stat = os.stat(image_path)
+ size = stat.st_size
+ except:
+ logging.info(f'cannot retrieve size from {image_path}')
+ size = 0
+
+ image_info.size = size
+
self._write_md5_file(f'/opt/opengnsys/images/{name}.img')
self._restartBrowser(self._url)