You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2018/10/26 23:49:09 UTC

[GitHub] nlu90 closed pull request #3056: enable boolean in --config-property key-value

nlu90 closed pull request #3056: enable boolean in --config-property key-value
URL: https://github.com/apache/incubator-heron/pull/3056
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/heron/tools/common/src/python/utils/config.py b/heron/tools/common/src/python/utils/config.py
index b055a1f8af..6f52af3ef7 100644
--- a/heron/tools/common/src/python/utils/config.py
+++ b/heron/tools/common/src/python/utils/config.py
@@ -413,7 +413,12 @@ def parse_override_config(namespace):
     kv = config.split("=")
     if len(kv) != 2:
       raise Exception("Invalid config property format (%s) expected key=value" % config)
-    overrides[kv[0]] = kv[1]
+    if kv[1] in ['true', 'True', 'TRUE']:
+      overrides[kv[0]] = True
+    elif kv[1] in ['false', 'False', 'FALSE']:
+      overrides[kv[0]] = False
+    else:
+      overrides[kv[0]] = kv[1]
   return overrides
 
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services