mirror of
https://github.com/cmehay/pyentrypoint
synced 2024-10-30 15:21:11 +00:00
Use safe_load for yaml parsing
This commit is contained in:
parent
b3bb8c270f
commit
d46fee4506
@ -1,5 +1,5 @@
|
|||||||
- repo: git://github.com/pre-commit/pre-commit-hooks
|
- repo: git://github.com/pre-commit/pre-commit-hooks
|
||||||
sha: 'v0.6.0'
|
sha: v0.9.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-docstring-first
|
- id: check-docstring-first
|
||||||
@ -13,7 +13,7 @@
|
|||||||
- id: requirements-txt-fixer
|
- id: requirements-txt-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: git://github.com/asottile/reorder_python_imports
|
- repo: git://github.com/asottile/reorder_python_imports
|
||||||
sha: 3d86483455ab5bd06cc1069fdd5ac57be5463f10
|
sha: v0.3.5
|
||||||
hooks:
|
hooks:
|
||||||
- id: reorder-python-imports
|
- id: reorder-python-imports
|
||||||
language_version: 'python2.7'
|
language_version: 'python2.7'
|
||||||
|
@ -10,8 +10,7 @@ from io import open
|
|||||||
from pwd import getpwnam
|
from pwd import getpwnam
|
||||||
|
|
||||||
from six import string_types
|
from six import string_types
|
||||||
from yaml import load
|
from yaml import safe_load
|
||||||
from yaml import Loader
|
|
||||||
|
|
||||||
from .command import Command
|
from .command import Command
|
||||||
from .constants import ENTRYPOINT_FILE
|
from .constants import ENTRYPOINT_FILE
|
||||||
@ -122,7 +121,7 @@ class Config(ConfigMeta):
|
|||||||
self.log.critical('Entrypoint config file does not provided')
|
self.log.critical('Entrypoint config file does not provided')
|
||||||
return
|
return
|
||||||
with open(self._config_file) as f:
|
with open(self._config_file) as f:
|
||||||
self._config = load(stream=f, Loader=Loader)
|
self._config = safe_load(stream=f)
|
||||||
self._check_config()
|
self._check_config()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
Reference in New Issue
Block a user