diff mbox series

[1/2] oeqa/gitarchive: Fix git push URL parameter

Message ID 20251230-mathieu-fix-15696-v1-1-b4de13efebc0@bootlin.com
State New
Headers show
Series oeqa/gitarchive: Push tag before copying log files | expand

Commit Message

Mathieu Dubois-Briand Dec. 30, 2025, 5:47 p.m. UTC
The gitarchive() function takes a `push` parameter than can be either a
boolean or a string. But this parameter is then passed to
expand_tag_strings(), which clearly expect it to be a string if it is
defined: make sure to pass either a string or None.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 meta/lib/oeqa/utils/gitarchive.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py
index 7e1d5057482f..25d337d9246b 100644
--- a/meta/lib/oeqa/utils/gitarchive.py
+++ b/meta/lib/oeqa/utils/gitarchive.py
@@ -175,11 +175,15 @@  def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms
     commit_msg += '\n\n' + format_str(commit_msg_body, keywords)
     branch_name = format_str(branch_name, keywords)
     tag_name = None
+
+    # push is either a boolean or a git remote URL string
+    push_url = push if isinstance(push, str) else None
+
     if not no_tag and tagname:
         tag_name, tag_msg = expand_tag_strings(data_repo, tagname,
                                                tag_msg_subject,
                                                tag_msg_body,
-                                               push, log, keywords)
+                                               push_url, log, keywords)
 
     # Commit data
     commit = git_commit_data(data_repo, data_dir, branch_name,