Skip to content

Commit

Permalink
Merge pull request #1632 from dcos/yaml-loader
Browse files Browse the repository at this point in the history
 Use explicit yaml loader to avoid warnings
  • Loading branch information
adamtheturtle authored Apr 2, 2019
2 parents acad61b + bbad41b commit d54e3f8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion admin/custom_linters.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def _travis_ci_patterns() -> Set[str]:
"""
travis_file = Path(__file__).parent.parent / '.travis.yml'
travis_contents = travis_file.read_text()
travis_dict = yaml.load(travis_contents)
travis_dict = yaml.load(travis_contents. Loader=yaml.FullLoader)
travis_matrix = travis_dict['env']['matrix']

ci_patterns = set() # type: Set[str]
Expand Down
2 changes: 1 addition & 1 deletion src/dcos_e2e_cli/common/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _validate_dcos_configuration(
content = Path(str(value)).read_text()

try:
return dict(yaml.load(content) or {})
return dict(yaml.load(content, Loader=yaml.FullLoader) or {})
except ValueError:
message = '"{content}" is not a valid DC/OS configuration'.format(
content=content,
Expand Down
2 changes: 1 addition & 1 deletion src/dcos_e2e_cli/dcos_vagrant/commands/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def _ip_from_vm_name(vm_name: str) -> Optional[IPv4Address]:
property_name,
]
property_result = vertigo_py.execute(args=args) # type: ignore
results = yaml.load(property_result)
results = yaml.load(property_result, Loader=yaml.FullLoader)
if results == 'No value set!':
return None
return IPv4Address(results['Value'])
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dcos_e2e/backends/vagrant/test_vagrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _ip_from_vm_name(vm_name: str,
property_name,
]
property_result = vertigo_py.execute(args=args) # type: ignore
results = yaml.load(property_result)
results = yaml.load(property_result, Loader=yaml.FullLoader)
if results == 'No value set!':
return None
return IPv4Address(results['Value'])
Expand Down

0 comments on commit d54e3f8

Please sign in to comment.