summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-08-21 16:44:37 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-09-01 10:06:01 +0100
commitec62e2289482d6f9151c39846e5113db23f76bf1 (patch)
tree7f2cbb8f2ee5e1404d8c0ed484aa074b7a68d39f
parent791f88469ebe2fa2cfadab8b2ad236538e049799 (diff)
downloadybd-ec62e2289482d6f9151c39846e5113db23f76bf1.tar.gz
Return early if .trees file does not exist
-rw-r--r--ybd/pots.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ybd/pots.py b/ybd/pots.py
index 96686ae..6f09b70 100644
--- a/ybd/pots.py
+++ b/ybd/pots.py
@@ -80,6 +80,8 @@ class Pots(object):
treefile = os.path.join(config['artifacts'], '.trees')
if not os.path.isfile(treefile):
treefile = os.path.join(config['defdir'], '.trees')
+ if not os.path.isfile(treefile):
+ return
with open(treefile) as f:
text = f.read()
if text: