Skip to content

Comments

Change yaml.Loader to yaml.SafeLoader#2818

Merged
yuumasato merged 2 commits intoComplianceAsCode:masterfrom
redhatrises:yaml_safeloader
May 2, 2018
Merged

Change yaml.Loader to yaml.SafeLoader#2818
yuumasato merged 2 commits intoComplianceAsCode:masterfrom
redhatrises:yaml_safeloader

Conversation

@redhatrises
Copy link
Contributor

Description:

  • Change yaml.Loader to yaml.SafeLoader

Rationale:

@redhatrises redhatrises added bugfix Fixes to reported bugs. BLOCKER Impediments to release, like failure to build content, or content built is out of standard's syntax labels May 2, 2018
@redhatrises redhatrises added this to the 0.1.39 milestone May 2, 2018

# Don't follow python bool case
yaml.Loader.add_constructor(u'tag:yaml.org,2002:bool', bool_constructor)
yaml.SafeLoader.add_constructor(u'tag:yaml.org,2002:bool', bool_constructor)
Copy link
Member

Choose a reason for hiding this comment

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

wait... every time we load a yaml we add a constructor to the static class?

Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be called right after we import "yaml" module?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mpreisler it doesn't have to. I moved it to the top after the imports.

@pep8speaks
Copy link

pep8speaks commented May 2, 2018

Hello @redhatrises! Thanks for updating the PR.

Cheers ! There are no PEP8 issues in this Pull Request. 🍻

Comment last updated on May 02, 2018 at 15:53 Hours UTC

@yuumasato
Copy link
Member

@redhatrises thank you for the fix. I was confused about why it was not working.

Selectors are working now. Ack.

@yuumasato yuumasato merged commit d8c1824 into ComplianceAsCode:master May 2, 2018
@yuumasato yuumasato self-assigned this May 2, 2018
@redhatrises redhatrises deleted the yaml_safeloader branch May 2, 2018 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLOCKER Impediments to release, like failure to build content, or content built is out of standard's syntax bugfix Fixes to reported bugs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants