Skip to content

Commit 8c0e7c9

Browse files
committed
Merge pull request #4317 from alex/patch-1
style(contrib/aws): Ensure that files are closed and use yaml.safe_load
2 parents ab4f091 + 287314c commit 8c0e7c9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

contrib/aws/gen-json.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
dict({'name': 'etcd.service', 'drop-ins': [{'name': '90-after-etcd-volume.conf', 'content': ETCD_DROPIN}]})
9696
]
9797

98-
data = yaml.load(file(os.path.join(CURR_DIR, '..', 'coreos', 'user-data'), 'r'))
98+
with open(os.path.join(CURR_DIR, '..', 'coreos', 'user-data'), 'r') as f:
99+
data = yaml.safe_load(f)
99100

100101
# coreos-cloudinit will start the units in order, so we want these to be processed before etcd/fleet
101102
# are started

0 commit comments

Comments
 (0)