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 strict variables error when facts are missing #708

Merged
merged 1 commit into from
Nov 6, 2017

Conversation

alexjfisher
Copy link
Member

An alternative to #707

@@ -34,7 +34,7 @@
$write_threads = $collectd::params::write_threads,
) inherits collectd::params {

$collectd_version_real = pick($::collectd_version, $minimum_version)
$collectd_version_real = pick_default($facts['collectd_version'], $minimum_version)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure if minimum_version is allowed to be set to undef, but pick_default would allow this.

@@ -135,5 +135,5 @@
}

# Override with custom fact value (present only if python is installed)
$python_dir = pick($::python_dir, $default_python_dir)
$python_dir = pick($facts['python_dir'], $default_python_dir)
Copy link
Member Author

Choose a reason for hiding this comment

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

default_python_dir is always set, so pick_default isn't needed/wanted here.

@bastelfreak bastelfreak added the bug Something isn't working label Nov 6, 2017
@bastelfreak bastelfreak merged commit 66d0b91 into voxpupuli:master Nov 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants