Skip to content

Commit

Permalink
fixed generating pipeline graph when pipeline name not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
bw2 committed Oct 19, 2023
1 parent 58f699e commit a7be32a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions step_pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,11 @@ def run(self):

args = self.parse_args()
if args.export_pipeline_graph:
output_filename_prefix = re.sub("[:, ]", "_", self.name)
output_svg_path = f"{output_filename_prefix}.pipeline_diagram.svg"
if self.name is None:
output_svg_path = "pipeline_diagram.svg"
else:
output_filename_prefix = re.sub("[:, ]", "_", self.name)
output_svg_path = f"{output_filename_prefix}.pipeline_diagram.svg"
self.export_pipeline_graph(output_svg_path=output_svg_path)
print(f"Generated {output_svg_path}. Exiting..")
sys.exit(0)
Expand Down

0 comments on commit a7be32a

Please sign in to comment.