Skip to content

Commit

Permalink
Added referenced main method for console script
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmezzetti committed Jun 6, 2020
1 parent ebd407e commit 77169fe
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/python/kernelpipes/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,15 @@ def run(task):
# Single run
Pipeline.execute(directory, pipeline)

if __name__ == "__main__":
def main():
"""
Main execution loop.
"""

if len(sys.argv) > 1:
Pipeline.run(sys.argv[1])
else:
print("Usage: pipeline <path to pipeline.yml file>")

if __name__ == "__main__":
main()

0 comments on commit 77169fe

Please sign in to comment.