Skip to content

Commit 76a1d70

Browse files
committed
Fix: Branch Param As String
Branches should always be a `string`, otherwise tags like `21.12` are parsed as floats, which leads to errors such as: ``` File "regression_testing/repo.py", line 38, in get_branch_name return self.branch_wanted.strip("\"") AttributeError: 'float' object has no attribute 'strip' ```
1 parent d917426 commit 76a1d70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def load_params(args):
100100
# AMReX -- this will always be defined
101101
rdir = mysuite.check_test_dir(safe_get(cp, "AMReX", "dir"))
102102

103-
branch = convert_type(safe_get(cp, "AMReX", "branch"))
103+
branch = safe_get(cp, "AMReX", "branch") # note: always as string
104104
rhash = convert_type(safe_get(cp, "AMReX", "hash"))
105105

106106
mysuite.repos["AMReX"] = repo.Repo(mysuite, rdir, "AMReX",
@@ -127,7 +127,7 @@ def load_params(args):
127127
k = "source"
128128

129129
rdir = mysuite.check_test_dir(safe_get(cp, s, "dir"))
130-
branch = convert_type(safe_get(cp, s, "branch"))
130+
branch = safe_get(cp, s, "branch") # note: always as string
131131
rhash = convert_type(safe_get(cp, s, "hash"))
132132

133133

0 commit comments

Comments
 (0)