Skip to content

Fix grains with '\n'#46278

Merged
rallytime merged 1 commit into
saltstack:2018.3.0rc1from
dincamihai:2018.3.0rc1
Mar 1, 2018
Merged

Fix grains with '\n'#46278
rallytime merged 1 commit into
saltstack:2018.3.0rc1from
dincamihai:2018.3.0rc1

Conversation

@dincamihai
Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the grains that contain a trailing new line char.

bash-4.3# salt-call --local grains.items --out=json > /tmp/before.json
# apply fix here
bash-4.3# salt-call --local grains.items --out=json > /tmp/after.json
bash-4.3# diff /tmp/before.json /tmp/after.json
3c3
<         "biosversion": "A14\n",
---
>         "biosversion": "A14",
27,28c27,28
<         "serialnumber": "GLK3A32\n",
<         "pid": 536,
---
>         "serialnumber": "GLK3A32",
>         "pid": 553,
57c57
<         "uuid": "2c3c1621-011x-5910-2163-b5a03f3c3834\n",
---
>         "uuid": "2c3c1621-011x-5910-2163-b5a03f3c3834",
227,228c227,228
<         "biosreleasedate": "09/14/2015\n",
<         "manufacturer": "Dell Inc.\n",
---
>         "biosreleasedate": "09/14/2015",
>         "manufacturer": "Dell Inc.",
249c249
<         "productname": "OptiPlex 9020\n",
---
>         "productname": "OptiPlex 9020",

Tests written?

No

Commits signed with GPG?

No

@rallytime rallytime merged commit fb978c0 into saltstack:2018.3.0rc1 Mar 1, 2018
@dincamihai dincamihai deleted the 2018.3.0rc1 branch March 1, 2018 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants