refs #2705: fix repository argument

pull/110/head
Vadim vtroshchinskiy 2025-09-03 15:58:49 +02:00
parent 090f6d3cf2
commit 17e8788f5f
3 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ def create_image(disk_num, partition_num, repo, image_name, commit_message):
ntfs_impl = NTFSImplementation.NTFS3G
og_git = OpengnsysGitLibrary(ntfs_implementation = ntfs_impl)
og_git.progress_callback = OgProgressPrinterWeb()
og_git.repo_server = repo
device = DiskLib.ogDiskToDev(disk_num, partition_num)
if device is None:

View File

@ -72,6 +72,7 @@ def commit_image(disk_num, partition_num, repository, branch, options, msg):
ntfs_impl = NTFSImplementation.NTFS3G
og_git = OpengnsysGitLibrary(ntfs_implementation = ntfs_impl)
og_git.progress_callback = OgProgressPrinterWeb()
og_git.repo_server = repository
device = DiskLib.ogDiskToDev(disk_num, partition_num)
if device is None:

View File

@ -94,6 +94,9 @@ if __name__ == "__main__":
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"))
if args.repository:
og_git.repo_server = args.repository
og_git.cloneRepo(args.image_name, destination = device, boot_device = device, ref = args.commit, branch = args.branch)
logger.info("RestaurarImagenGit Finished.")