virtual: add missing check=True to subprocess.run()

Raise exception from subprocess.run() calls as previous code is
trying to capture these exceptions to handle de errors.
master
Alejandro Sirgo Rica 2024-03-18 14:49:26 +01:00 committed by lupoDharkael
parent 2a4ce65a20
commit 657af13351
1 changed files with 2 additions and 2 deletions

View File

@ -418,7 +418,7 @@ class OgVirtualOperations:
except:
return None
subprocess.run([f'umount {self.OG_IMAGES_PATH}'], shell=True)
subprocess.run([f'umount {self.OG_IMAGES_PATH}'], shell=True, check=True)
return True
@ -445,7 +445,7 @@ class OgVirtualOperations:
f'ro,nolock,serverino,acl,' \
f'username={samba_config["user"]},' \
f'password={samba_config["pass"]}'
subprocess.run([cmd], shell=True)
subprocess.run([cmd], shell=True, check=True)
try:
shutil.copy(f'{self.OG_IMAGES_PATH}/{name}', drive_path)