Skip to content

Commit

Permalink
Merge pull request #24 from fubar2/master
Browse files Browse the repository at this point in the history
  • Loading branch information
hexylena authored Aug 11, 2020
2 parents a9ad734 + eebd640 commit 49c9ce5
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions galaxyxml/tool/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


class Tool(GalaxyXML):

def __init__(
self,
name,
Expand All @@ -25,10 +26,12 @@ def __init__(
workflow_compatible=True,
interpreter=None,
version_command="interpreter filename.exe --version",
command_line_override=None,
):

self.executable = executable
self.interpreter = interpreter
self.command_line_override = command_line_override
kwargs = {
"name": name,
"id": id,
Expand Down Expand Up @@ -111,16 +114,19 @@ def export(self, keep_old_command=False): # noqa
except Exception:
pass

command_line = []
try:
command_line.append(export_xml.inputs.cli())
except Exception as e:
logger.warning(str(e))

try:
command_line.append(export_xml.outputs.cli())
except Exception:
pass
if self.command_line_override:
command_line = self.command_line_override
else:
command_line = []
try:
command_line.append(export_xml.inputs.cli())
except Exception as e:
logger.warning(str(e))

try:
command_line.append(export_xml.outputs.cli())
except Exception:
pass

# Add stdio section
stdio = etree.SubElement(export_xml.root, "stdio")
Expand Down

0 comments on commit 49c9ce5

Please sign in to comment.