summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ybd/pots.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/ybd/pots.py b/ybd/pots.py
index 3e37419..e247a0e 100644
--- a/ybd/pots.py
+++ b/ybd/pots.py
@@ -77,7 +77,10 @@ class Pots(object):
def _set_trees(self):
'''Use the tree values from .trees file, to save time'''
try:
- with open(os.path.join(config['artifacts'], '.trees')) as f:
+ treefile = os.path.join(config['artifacts'], '.trees')
+ if not os.path.isfile(treefile):
+ treefile = os.path.join(config['defdir'], '.trees')
+ with open(treefile) as f:
text = f.read()
if text:
self._trees = yaml.safe_load(text)