mirror of https://git.48k.eu/ogclient
#1000 live: check imageCreate for non-zero return code
When running image_create operation an underlying script "imageCreate" is called using the subprocess python module. This script may fail, for example if the repository in which the image is to be stored has no sufficent capacity. Check for non-zero when the imageCreate process has finished.more_events v1.2.0
parent
f0aa3df485
commit
baa03debd7
|
@ -240,6 +240,9 @@ class OgLiveOperations:
|
|||
except:
|
||||
raise ValueError('Error: Incorrect command value')
|
||||
|
||||
if ogRest.proc.returncode != 0:
|
||||
raise ValueError('Error: Image creation failed')
|
||||
|
||||
with open('/tmp/image.info') as file_info:
|
||||
line = file_info.readline().rstrip()
|
||||
|
||||
|
|
Loading…
Reference in New Issue