diff --git a/ogclient/interfaceAdm/CrearImagenGit b/ogclient/interfaceAdm/CrearImagenGit index 157c774..7aa879c 100755 --- a/ogclient/interfaceAdm/CrearImagenGit +++ b/ogclient/interfaceAdm/CrearImagenGit @@ -42,6 +42,9 @@ def create_image(disk_num, partition_num, repo, image_name): og_git.progress_callback = OgProgressPrinterWeb() device = DiskLib.ogDiskToDev(disk_num, partition_num) + if device is None: + sys.exit(SystemLib.ogRaiseError([], ogGlobals.OG_ERR_FORMAT, f"Failed to translate disk {disk_num} partition {partition_num} to a device")) + if og_git.initRepo(device, image_name): return 0 else: diff --git a/ogclient/interfaceAdm/ModificarImagenGit b/ogclient/interfaceAdm/ModificarImagenGit index 25aa943..c9ac305 100755 --- a/ogclient/interfaceAdm/ModificarImagenGit +++ b/ogclient/interfaceAdm/ModificarImagenGit @@ -74,6 +74,8 @@ def commit_image(disk_num, partition_num, repository, branch, options, msg): og_git.progress_callback = OgProgressPrinterWeb() device = DiskLib.ogDiskToDev(disk_num, partition_num) + if device is None: + sys.exit(SystemLib.ogRaiseError([], ogGlobals.OG_ERR_FORMAT, f"Failed to translate disk {disk_num} partition {partition_num} to a device")) force_push = False opts = options.split(",") diff --git a/ogclient/interfaceAdm/RestaurarImagenGit b/ogclient/interfaceAdm/RestaurarImagenGit index 8896703..0fd79f2 100755 --- a/ogclient/interfaceAdm/RestaurarImagenGit +++ b/ogclient/interfaceAdm/RestaurarImagenGit @@ -91,6 +91,8 @@ if __name__ == "__main__": og_git.progress_callback = OgProgressPrinterWeb() device = DiskLib.ogDiskToDev(args.disk, args.partition) + if device is None: + sys.exit(SystemLib.ogRaiseError([], ogGlobals.OG_ERR_FORMAT, f"Failed to translate disk {args.disk} partition {args.partition} to a device")) og_git.cloneRepo(args.image_name, destination = device, boot_device = device, ref = args.commit, branch = args.branch)