Skip to content

Commit 9fc1296

Browse files
authored
Merge pull request #704 from galaxyproject/none_version
handle None versions
2 parents eb5b083 + 57718c1 commit 9fc1296

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

planemo/commands/cmd_container_register.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,14 @@ def handle_pull_request(self, ctx, name, target_filename, packages_str, tools_st
159159

160160
def write_targets(self, ctx, target_filename, mulled_targets):
161161
with open(target_filename, "w") as f:
162-
contents = ",".join(["%s=%s" % (t.package_name, t.version) for t in mulled_targets])
162+
target_strings = list()
163+
for target in mulled_targets:
164+
if target.version:
165+
target_str = "%s=%s" % (target.package_name, target.version)
166+
else:
167+
target_str = target.package_name
168+
target_strings.append(target_str)
169+
contents = ",".join(target_strings)
163170
f.write(contents)
164171
ctx.vlog("Wrote requirements [%s] to file [%s]" % (contents, target_filename))
165172

0 commit comments

Comments
 (0)