From bdca1ce8ccbabc8fb8ea8111219a9c622888103f Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Mon, 27 Aug 2018 13:43:47 +0300 Subject: [PATCH] pipeline: fix corner case Signed-off-by: Ruslan Kuprieiev --- dvc/command/pipeline.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dvc/command/pipeline.py b/dvc/command/pipeline.py index b73bb8de2..1c0b06263 100644 --- a/dvc/command/pipeline.py +++ b/dvc/command/pipeline.py @@ -33,8 +33,6 @@ class CmdPipelineShow(CmdBase): pipelines = list(filter(lambda g: node in g.nodes(), self.project.pipelines())) - if len(pipelines) == 0: - return assert len(pipelines) == 1 G = pipelines[0] @@ -46,9 +44,9 @@ class CmdPipelineShow(CmdBase): from_stage = stages[e[0]] to_stage = stages[e[1]] if commands: + nodes.add(from_stage.cmd) if to_stage.cmd is None: continue - nodes.add(from_stage.cmd) nodes.add(to_stage.cmd) edges.append((from_stage.cmd, to_stage.cmd)) elif outs: