SLIDER-1151 Don't log Invalid port range values when there are no invalid ports 
specified (Manoj Samel via gourksaha)


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/6de357cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/6de357cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/6de357cc

Branch: refs/heads/feature/SLIDER-1107_AM_config_generation
Commit: 6de357cc8926877fae4d51641c4b1fb102e0938a
Parents: f4ae985
Author: Gour Saha <gourks...@apache.org>
Authored: Thu Jul 7 15:48:58 2016 -0700
Committer: Gour Saha <gourks...@apache.org>
Committed: Thu Jul 7 15:48:58 2016 -0700

----------------------------------------------------------------------
 slider-agent/src/main/python/agent/CustomServiceOrchestrator.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/6de357cc/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py
----------------------------------------------------------------------
diff --git a/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py 
b/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py
index 13c978b..5b73fa4 100644
--- a/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py
+++ b/slider-agent/src/main/python/agent/CustomServiceOrchestrator.py
@@ -497,7 +497,8 @@ class CustomServiceOrchestrator():
     selection = random.sample(selection, min (len(selection), num_values))
     # Report invalid tokens before returning valid selection
     logger.info("Allowed port values: " + str(selection))
-    logger.warning("Invalid port range values: " + str(invalid))
+    if len(invalid):
+      logger.warning("Invalid port range values: " + str(invalid))
     return selection
 
 

Reply via email to