Skip to content

Commit

Permalink
Fix bug from new ref*yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
wshayes committed Jul 1, 2019
1 parent 58d4716 commit 5c21f71
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bel/lang/bel_specification.py
Expand Up @@ -170,7 +170,7 @@ def update_specifications(force: bool = False):
os.rename(fn, new_fn)

# Convert YAML to enhanced JSON
files = glob.glob(f"{spec_dir}/*.yaml")
files = glob.glob(f"{spec_dir}/bel_*.yaml")
versions = {}
for fn in files:
filename = os.path.basename(fn)
Expand Down Expand Up @@ -278,12 +278,8 @@ def belspec_yaml2json(yaml_fn: str, json_fn: str) -> str:
with open(json_fn, "w") as f:
json.dump(spec_dict, f)

except Exception as e:
log.error(
"Warning: BEL Specification {yaml_fn} could not be read. Cannot proceed.".format(
yaml_fn
)
)
except Exception:
log.error(f"Warning: BEL Specification {yaml_fn} could not be read. Cannot proceed.")
sys.exit()

return spec_dict["version"]
Expand Down

0 comments on commit 5c21f71

Please sign in to comment.