Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix python OR logic when parsing options #4

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

fitzn
Copy link

@fitzn fitzn commented Dec 20, 2017

No description provided.

@fitzn fitzn requested a review from richid December 20, 2017 21:31
Copy link

@richid richid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@richid richid merged commit 6e0bb3b into 5.19.x Dec 20, 2017
@richid richid deleted the fix-args-disable-aws-resources branch December 20, 2017 21:36
@@ -524,7 +524,9 @@ def get_config(parse_args=True, cfg_path=None, options=None, can_query_registry=
agentConfig['statsd_forward_port'] = int(config.get('Main', 'statsd_forward_port'))

if config.has_option("Main", "dogstatsd_remove_aws_resource_tags"):
agentConfig["dogstatsd_remove_aws_resource_tags"] = _is_affirmative(config.get("Main", "dogstatsd_remove_aws_resource_tags")) || _is_affirmative(config.get("Main", "dogstatsd_remove_host_tag"))
agentConfig["dogstatsd_remove_aws_resource_tags"] = _is_affirmative(config.get("Main", "dogstatsd_remove_aws_resource_tags"))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not or?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'd have to change the outer guard (if config.has_option("Main", "dogstatsd_remove_aws_resource_tags")) to also check for the additional option and then do more conditional checks in here. Seemed easier to just elif it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants