diff options
author | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-04-06 12:51:34 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-04-06 12:51:34 +0200 |
commit | c716b864564ea3b461039639765e6404b9c5c96c (patch) | |
tree | 76160501d8bba716bc440454f9b780f37227d15f | |
parent | 917197d0e3a8e916e59784b418ecf5ef2f241043 (diff) |
Fix case when vcs_branch is not set
Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Change-Id: I9d6f5cb51501b1cdfd9a643c28af96c48323704f
-rw-r--r-- | utils/agljobtemplate.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/agljobtemplate.py b/utils/agljobtemplate.py index 9c59b3f..deb5ff8 100644 --- a/utils/agljobtemplate.py +++ b/utils/agljobtemplate.py @@ -188,6 +188,7 @@ class Agljobtemplate(object): if vcs_branch is not None: job['vcs_branch'] = vcs_branch + machine_branch = machine + '-' + vcs_branch + '.jinja2' if build_version is not None: job['kernel_version'] = build_version @@ -223,9 +224,7 @@ class Agljobtemplate(object): env = jinja2.Environment(loader=jinja2.FileSystemLoader(self._template_path)) env.filters['get_extension'] = get_extension - machine_branch = machine + '-' + vcs_branch + '.jinja2' - - if machine_branch in os.listdir(os.path.join(self._template_path, self.MACHINES_DIR, self.MACHINES_BRANCH_DIR)): + if machine_branch and machine_branch in os.listdir(os.path.join(self._template_path, self.MACHINES_DIR, self.MACHINES_BRANCH_DIR)): template = env.get_template(os.path.join(self.MACHINES_DIR, self.MACHINES_BRANCH_DIR, machine_branch)) else: template = env.get_template(os.path.join(self.MACHINES_DIR, machine + ".jinja2")) |