From: W. Trevor King Date: Thu, 25 Jun 2009 12:05:43 +0000 (-0400) Subject: Fixed settings=None bug when bug values file is blank/missing. X-Git-Tag: 1.0.0~70^2^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=706d1837c99a938fd8ae0d78d72525eb6a3e6aee;p=be.git Fixed settings=None bug when bug values file is blank/missing. Just return an empty dict instead. Steps to reproduce: $ mkdir /tmp/BE-test $ cd /tmp/BE-test $ be set-root $ be new 'having too much fun' --- diff --git a/libbe/mapfile.py b/libbe/mapfile.py index c36d454..0272890 100644 --- a/libbe/mapfile.py +++ b/libbe/mapfile.py @@ -113,7 +113,7 @@ def parse(contents): else: newlines.append(line) contents = '\n'.join(newlines) - return yaml.load(contents) + return yaml.load(contents) or {} def map_save(rcs, path, map, allow_no_rcs=False): """Save the map as a mapfile to the specified path"""