Advertisement
BinaryJacob

yaml2

Nov 25th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/usr/bin/env python2.7
  2. import yaml
  3.  
  4. def ip():
  5. try:
  6. with open("ecs.yml") as stream:
  7. data=yaml.load(stream)
  8. location=["us-east-1","us-west-1"]
  9. for x in location:
  10. for value in data[x]:
  11. print(value)
  12. except yaml.YAMLError as exc:
  13. print(exc)
  14. ip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement