Skip to content

Commit

Permalink
Fix getting clade_version
Browse files Browse the repository at this point in the history
  • Loading branch information
17451k committed Jun 26, 2020
1 parent 489fb89 commit a66b851
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clade/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,12 @@ def get_conf(self):

def get_version(self):
"""Get the version of Clade that was used to create specified working directory."""
return self.get_meta()["clade_version"]
meta = self.get_meta()

if "versions" in meta:
return meta["versions"]["clade"]
else:
return meta.get("clade_version", "unknown")

def get_meta_by_key(self, key):
"""Get meta information by its key"""
Expand Down

0 comments on commit a66b851

Please sign in to comment.