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

Use safe yaml loader. #31

Merged
merged 1 commit into from Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion kubepy/api.py
Expand Up @@ -16,7 +16,7 @@ def get(kind, name=None):
command.append(name)
get_process = subprocess.Popen(
command, stdout=subprocess.PIPE, stderr=sys.stderr)
objects = yaml.load(get_process.stdout)
objects = yaml.safe_load(get_process.stdout)
if get_process.wait() != 0:
raise ApiError
return objects
Expand Down
2 changes: 1 addition & 1 deletion kubepy/definition_manager.py
Expand Up @@ -59,4 +59,4 @@ def get_path_from_name(self, name):

def get_yaml_from_file(self, path):
with path.open() as yaml_file:
return yaml.load(yaml_file)
return yaml.safe_load(yaml_file)