Skip to content

Commit f5974ba

Browse files
committed
Fix git sync failing to clone
1 parent f161232 commit f5974ba

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGES/+git_sync_clone.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed a bug that made synching git repositories fail on clone.

pulp_ansible/app/tasks/collections.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ async def declarative_content_from_git_repo(remote, url, git_ref=None, metadata_
133133
if git_ref:
134134
try:
135135
gitrepo = Repo.clone_from(
136-
url, uuid4(), depth=1, branch=git_ref, multi_options=["--recurse-submodules"]
136+
url, str(uuid4()), depth=1, branch=git_ref, multi_options=["--recurse-submodules"]
137137
)
138138
except GitCommandError:
139-
gitrepo = Repo.clone_from(url, uuid4(), multi_options=["--recurse-submodules"])
139+
gitrepo = Repo.clone_from(url, str(uuid4()), multi_options=["--recurse-submodules"])
140140
gitrepo.git.checkout(git_ref)
141141
else:
142-
gitrepo = Repo.clone_from(url, uuid4(), depth=1, multi_options=["--recurse-submodules"])
142+
gitrepo = Repo.clone_from(url, str(uuid4()), depth=1, multi_options=["--recurse-submodules"])
143143
commit_sha = gitrepo.head.commit.hexsha
144144
metadata, artifact_path = sync_collection(gitrepo.working_dir, ".")
145145
artifact = Artifact.init_and_validate(artifact_path)

0 commit comments

Comments
 (0)