Skip to content

Commit

Permalink
load requires a Loader arg in latest PyYAML
Browse files Browse the repository at this point in the history
PyYAML 6.0 was released recently and the load method now requires a Loader argument (see yaml/pyyaml#561 and yaml/pyyaml#576). Can either provide one like this (I think it's backwards compatible with version 5) or could pin the version of PyYAML in requirements.txt.
  • Loading branch information
henryaddison authored Oct 26, 2021
1 parent 691870a commit e86ea4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion start_zk_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
template = jinja_environment.get_template('zoo.cfg.template')

with open('config.yaml') as f:
config = yaml.load(f)
config = yaml.load(f, Loader=yaml.SafeLoader)

hosts = [(k, v) for k, v in config['hosts'].items()]

Expand Down

0 comments on commit e86ea4c

Please sign in to comment.