This commit is contained in:
Michael Kaye 2019-06-05 10:01:22 +01:00
parent 00d3697e63
commit cea4154788

View file

@ -311,7 +311,7 @@ def get_postgres_conn(parser):
"""Attempt to get a postgres connection based on database.yaml, or exit. """Attempt to get a postgres connection based on database.yaml, or exit.
""" """
try: try:
database_yaml = yaml.load(open("database.yaml")) database_yaml = yaml.safe_load(open("database.yaml"))
except FileNotFoundError: except FileNotFoundError:
parser.error("Could not find database.yaml") parser.error("Could not find database.yaml")
except yaml.YAMLError as e: except yaml.YAMLError as e: