diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2017-05-26 14:05:27 +0000 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2017-05-26 14:05:27 +0000 |
commit | 35fe0dcf571abf95277d760251c0788a93944306 (patch) | |
tree | 78c5643c5967c0a32b189a497879d778340973d0 | |
parent | 43b41a4cc59294b185512ec7236cd849f0c4576f (diff) | |
parent | abc33febbfa119184ecdde3d963d94d889274686 (diff) | |
download | ybd-35fe0dcf571abf95277d760251c0788a93944306.tar.gz |
Merge branch 'ps-treefile-in-definitions' into 'master'
Fallback check for treefile in definitions
See merge request !363
-rw-r--r-- | ybd/pots.py | 5 |
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) |