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

Fix sometimes host analysis cannot get the linux packages info #15140

Merged
merged 2 commits into from
May 19, 2017

Conversation

NaNi-Z
Copy link
Contributor

@NaNi-Z NaNi-Z commented May 18, 2017

When a Linux package’s description has Unicode characters, the host analysis cannot get the packages info.
The result of ssh command(rpm -qa) is ASCII code. When saving the package's info to the xml, it will do some substitution like "\r\n" to "\n". But the regular expression is Unicode(ruby default), so it comes an error.

e.g

iwl3945-firmware|15.32.2.9|noarch|System Environment/Kernel|43.el7|Firmware for Intel® PRO/Wireless 3945 A/B/G network adaptors

The registered trademark character will cause the error.

@miq-bot
Copy link
Member

miq-bot commented May 18, 2017

Checked commits NaNi-Z/manageiq@8f0da2a~...3f7af27 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 🏆

Copy link
Member

@bdunne bdunne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@NaNi-Z This looks great, thanks for the PR. Would it be possible to add a test for this?

@NaNi-Z
Copy link
Contributor Author

NaNi-Z commented May 19, 2017

@bdunne 😞Sorry, I don't know how to add a spec test for now, I'm learning. I just test it by my hand.

@bdunne bdunne merged commit 6769257 into ManageIQ:master May 19, 2017
@bdunne bdunne added this to the Sprint 61 Ending May 22, 2017 milestone May 19, 2017
bdunne added a commit to bdunne/manageiq that referenced this pull request May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants