default value is stripped #324
Labels
No labels
bugfix
cleanup
discussion
documentation
doing
done
feature
improvement
packaging
Stale
testing
TODO
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: ungleich-public/cdist#324
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am trying to write my first type to search for a regex (i.e. (key)(separtor)(old_value) and replace it with a comment out version, followed by key separator new_value. As such, I would like the default value for the parameter comment to be '# ' (no quotes, trailing space). @manis_ tells me that this doens't work because it's being stripped:
https://github.com/cdist-community/cdist-core/blob/main/cdist/core/cdist_type.py#L276
and @manis_'s suggestion is to only strip newlines. Maybe rstrip('\n')?