You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by nw...@apache.org on 2019/03/26 18:23:57 UTC
[incubator-heron] branch master updated: Fix command line result
when --dry-run is enabled (#3226)
This is an automated email from the ASF dual-hosted git repository.
nwang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-heron.git
The following commit(s) were added to refs/heads/master by this push:
new 0841d2c Fix command line result when --dry-run is enabled (#3226)
0841d2c is described below
commit 0841d2c4da2ea531ed7e61463e0eddb8329b9e85
Author: Ning Wang <nw...@twitter.com>
AuthorDate: Tue Mar 26 11:23:53 2019 -0700
Fix command line result when --dry-run is enabled (#3226)
---
heron/tools/cli/src/python/result.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/heron/tools/cli/src/python/result.py b/heron/tools/cli/src/python/result.py
index 5152021..e8b556d 100644
--- a/heron/tools/cli/src/python/result.py
+++ b/heron/tools/cli/src/python/result.py
@@ -186,8 +186,8 @@ def render(results):
# check if all results are successful
def is_successful(results):
if isinstance(results, list):
- return all([result.status == Status.Ok for result in results])
+ return all([is_successful(result) for result in results])
elif isinstance(results, Result):
- return results.status == Status.Ok
+ return results.status == Status.Ok or results.status == Status.DryRun
else:
raise RuntimeError("Unknown result instance: %s", str(results.__class__))