Use yaml safe_load where easily possible

This commit is contained in:
Sebastian Lohff 2013-12-03 23:18:30 +01:00
parent 4ce06a2adb
commit 87c9cbddaa
2 changed files with 2 additions and 2 deletions

View File

@ -50,7 +50,7 @@ class Questions(object):
# load yaml
ysrc = None
try:
ysrc = yaml.load(f.read())
ysrc = yaml.safe_load(f.read())
except Exception as e:
raise QuestionException("Error parsing question file %s: %s" % (self.qfile, e))

View File

@ -33,7 +33,7 @@ if __name__ == '__main__':
# check and load config file
config = None
try:
config = yaml.load(open(args.conf))
config = yaml.safe_load(open(args.conf))
except IOError as e:
print("Error: Could not load config: %s" % (str(e),), file=sys.stderr)
sys.exit(1)