diff options
author | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2017-05-26 12:53:23 +0100 |
---|---|---|
committer | Paul Sherwood <paul.sherwood@codethink.co.uk> | 2017-05-26 12:53:23 +0100 |
commit | abc33febbfa119184ecdde3d963d94d889274686 (patch) | |
tree | 78c5643c5967c0a32b189a497879d778340973d0 | |
parent | 43b41a4cc59294b185512ec7236cd849f0c4576f (diff) | |
download | ybd-ps-treefile-in-definitions.tar.gz |
Fallback check for treefile in definitionsps-treefile-in-definitions
-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) |