From 0773c1b9594ad5705efa0403dd02aa3e0526317c Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Mon, 20 Dec 2021 23:17:45 +0100 Subject: [PATCH 1/2] [cdist_type] Only strip trailing new lines from parameter defaults This allows parameter defaults like '# ' (without quotes). --- cdist/core/cdist_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cdist/core/cdist_type.py b/cdist/core/cdist_type.py index b68448bca..fa5470fcf 100644 --- a/cdist/core/cdist_type.py +++ b/cdist/core/cdist_type.py @@ -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: From 879409acae98047e8c825d3bb909fb028d2df06d Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Mon, 20 Dec 2021 23:52:14 +0100 Subject: [PATCH 2/2] ++changelog --- docs/changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog b/docs/changelog index 4008e3c2c..3af27c56d 100644 --- a/docs/changelog +++ b/docs/changelog @@ -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)