Skip to content

Commit

Permalink
swancustomenvironments: Code simplification
Browse files Browse the repository at this point in the history
Specify builder_version only when it is provided
  • Loading branch information
rodrigo-sobral authored and etejedor committed Oct 15, 2024
1 parent 50cea59 commit bd8e5b4
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def get(self):
builder = self.get_query_argument("builder", default="")
builder_version = self.get_query_argument("builder_version", default="")

arguments = ["--repo", repository, "--repo_type", repo_type, "--builder", builder, "--builder_version", builder_version]
arguments = ["--repo", repository, "--repo_type", repo_type, "--builder", builder]
if builder_version:
arguments.extend(("--builder_version", builder_version))

makenv_process = subprocess.Popen([self.makenv_path, *arguments], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)

for line in iter(makenv_process.stdout.readline, b""):
Expand Down

0 comments on commit bd8e5b4

Please sign in to comment.