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

catch unicode encoding errors in json outputter #36033

Merged
merged 1 commit into from
Sep 2, 2016

Conversation

gtmanfred
Copy link
Contributor

What does this PR do?

Catch errors when unable to encode text to utf8 for the json outputter.

Tests written?

YES!!!

@gtmanfred gtmanfred added RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. TEAM RIoT ZRELEASED - 2016.3.4 labels Sep 2, 2016
@gtmanfred gtmanfred added this to the C 4 milestone Sep 2, 2016
@gtmanfred gtmanfred self-assigned this Sep 2, 2016
@gtmanfred gtmanfred added the ZD The issue is related to a Zendesk customer support ticket. label Sep 2, 2016
@rallytime
Copy link
Contributor

Yay tests!!!

@meggiebot meggiebot removed ZRELEASED - 2016.3.4 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. TEAM RIoT ZD The issue is related to a Zendesk customer support ticket. labels Sep 2, 2016
@meggiebot meggiebot removed this from the C 4 milestone Sep 2, 2016
@rallytime rallytime merged commit 65b6734 into saltstack:2016.3 Sep 2, 2016
@damon-atkins
Copy link
Contributor

Hi @rallytime and @gtmanfred
In develop, it's expected to be able to output Unicode. So testing Unicode fails seems the wrong approach.

C:\salt>salt-call -l info  pkg.list_pkgs  --out=json
{
    "local": {
        "LakeCity\u2122": "4.0.96.5684",
        "Indeo\u00ae Software": "(value not set)",
        "Skype\u2122 7.0": "7.0.102",
    }
}

This is not linked to an issue, so I can not see the source of the problem.
If the source needs to deal with Unicode it should have "from future import unicode_literals". In fact saltstack should just add the line to every file and release a beta.

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.

None yet

4 participants