From c0acde1b0c7956a9b9eecde2b8814a986d2abe27 Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 10 May 2018 18:25:57 +0000 Subject: [PATCH] Fixed the examples argument parser problem of not handling booleans --- examples/nontrivial/main.py | 4 ++-- examples/trivial/main.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/nontrivial/main.py b/examples/nontrivial/main.py index 1107f43..6c40f56 100644 --- a/examples/nontrivial/main.py +++ b/examples/nontrivial/main.py @@ -69,8 +69,8 @@ def lightstep_tracer_from_args(): default='collector.lightstep.com') parser.add_argument('--port', help='The LightStep reporting service port.', type=int, default=443) - parser.add_argument('--use_tls', help='Whether to use TLS for reporting', - type=bool, default=True) + parser.add_argument('--use_tls', help='Add this argument if you want to use TLS.', + action='store_true') parser.add_argument('--component_name', help='The LightStep component name', default='NonTrivialExample') args = parser.parse_args() diff --git a/examples/trivial/main.py b/examples/trivial/main.py index 6e5663b..5474224 100644 --- a/examples/trivial/main.py +++ b/examples/trivial/main.py @@ -62,8 +62,8 @@ def lightstep_tracer_from_args(): default='collector.lightstep.com') parser.add_argument('--port', help='The LightStep reporting service port.', type=int, default=443) - parser.add_argument('--use_tls', help='Whether to use TLS for reporting', - type=bool, default=True) + parser.add_argument('--use_tls', help='Add this argument if you want to use TLS.', + action='store_true') parser.add_argument('--component_name', help='The LightStep component name', default='TrivialExample') args = parser.parse_args()