Skip to content

Commit

Permalink
Merge pull request #603 from aodn/name-table-from-envvar
Browse files Browse the repository at this point in the history
Allow StandardNameTable to optionally load CF standard name table fro…
  • Loading branch information
Bob Fratantonio authored Aug 23, 2018
2 parents 74cabf1 + 578478e commit 321342d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compliance_checker/cf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ def __init__(self, cached_location=None):
if cached_location:
with io.open(cached_location, 'r', encoding='utf-8') as fp:
resource_text = fp.read()
elif os.environ.get('CF_STANDARD_NAME_TABLE') and os.path.exists(os.environ['CF_STANDARD_NAME_TABLE']):
with io.open(os.environ['CF_STANDARD_NAME_TABLE'], 'r', encoding='utf-8') as fp:
resource_text = fp.read()
else:
resource_text = get_data("compliance_checker", "data/cf-standard-name-table.xml")

Expand Down

0 comments on commit 321342d

Please sign in to comment.