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

[cdist_type] Only strip trailing new lines from parameter defaults #784

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cdist/core/cdist_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def parameter_defaults(self):
for name in cdist.core.listdir(defaults_dir):
try:
with open(os.path.join(defaults_dir, name)) as fd:
defaults[name] = fd.read().strip()
defaults[name] = fd.read().rstrip("\n")
except EnvironmentError:
pass # Swallow errors raised by open() or read()
except EnvironmentError:
Expand Down
1 change: 1 addition & 0 deletions docs/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ next:
* Type __debconf_set_selections: Fix bug where --file was unsupported (Evilham)
* Types __letsencrypt_cert, __grafana_dashboard: Improve bullseye support (Evilham)
* Type __package_apt: Mark already installed packages as manual (Dennis Camera)
* Core: Strip only trailing new lines from parameter defaults, instead of leading and trailing whitespace (Dennis Camera)

6.9.8: 2021-08-24
* Type __rsync: Rewrite (Ander Punnar)
Expand Down