default value is stripped #324

Open
opened 2021-12-20 22:18:21 +00:00 by allan_wind · 0 comments

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')?

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')?
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#324
No description provided.