summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/live/ogOperations.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py
index f3b647e..e19a788 100644
--- a/src/live/ogOperations.py
+++ b/src/live/ogOperations.py
@@ -438,17 +438,17 @@ class OgLiveOperations:
padev = cxt.partition_to_string(pa, fdisk.FDISK_FIELD_DEVICE)
fstype = cxt.partition_to_string(pa, fdisk.FDISK_FIELD_FSTYPE)
if not fstype:
- logging.error('No filesystem detected. Aborting image creation.')
- raise ValueError('Target partition has no filesystem present')
+ logging.error('No filesystem detected. Aborting image creation.')
+ raise ValueError('Target partition has no filesystem present')
cambiar_acceso(user=self._smb_user, pwd=self._smb_pass)
if os.access(f'/opt/opengnsys/images', os.R_OK | os.W_OK) == False:
- logging.error('Cannot access /opt/opengnsys/images in read and write mode, check permissions')
- raise ValueError('Cannot access image folder')
+ logging.error('Cannot access /opt/opengnsys/images in read and write mode, check permissions')
+ raise ValueError('Cannot access image folder')
if os.access(f'{image_path}', os.R_OK) == True:
- logging.info(f'image file {image_path} already exists, updating.')
+ logging.info(f'image file {image_path} already exists, updating.')
ogCopyEfiBootLoader(disk, partition)
ogReduceFs(disk, partition)
@@ -459,7 +459,7 @@ class OgLiveOperations:
logfile = open('/tmp/command.log', 'wb', 0)
if os.path.exists(image_path) and backup:
- shutil.move(image_path, f'{image_path}.ant')
+ shutil.move(image_path, f'{image_path}.ant')
p1 = Popen(cmd1, stdout=PIPE, stderr=logfile)
p2 = Popen(cmd2, stdin=p1.stdout)
@@ -468,13 +468,13 @@ class OgLiveOperations:
logging.info(f'Running image creation process, please do not shut down or reboot the client')
try:
- retdata = p2.communicate()
+ retdata = p2.communicate()
except OSError as e:
- logging.exception('Unexpected error when running partclone and lzop commands')
+ logging.exception('Unexpected error when running partclone and lzop commands')
finally:
- logfile.close()
- p2.terminate()
- p1.poll()
+ logfile.close()
+ p2.terminate()
+ p1.poll()
logging.info(f'partclone process exited with code {p1.returncode}')
logging.info(f'lzop process exited with code {p2.returncode}')
@@ -482,8 +482,8 @@ class OgLiveOperations:
ogExtendFs(disk, partition)
if os.access(f'{image_path}', os.R_OK) == False:
- logging.error(f'Cannot access partclone image file {image_path}')
- raise ValueError('Cannot access image file')
+ logging.error(f'Cannot access partclone image file {image_path}')
+ raise ValueError('Cannot access image file')
image_info = ogGetImageInfo(image_path)
except: