diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-03-18 14:49:26 +0100 |
---|---|---|
committer | lupoDharkael <izhe@hotmail.es> | 2024-03-21 10:29:57 +0100 |
commit | 657af133518699a7462f806b3162376d173cbb69 (patch) | |
tree | 2e977e15964ca17f5d5fa339e04a3be758229311 | |
parent | 2a4ce65a20b41a670b274cb473d46e62b4f3c913 (diff) |
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.
-rw-r--r-- | src/virtual/ogOperations.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/virtual/ogOperations.py b/src/virtual/ogOperations.py index a3f94a8..930382d 100644 --- a/src/virtual/ogOperations.py +++ b/src/virtual/ogOperations.py @@ -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) |