Skip to content

Commit

Permalink
Fix bug related to pygit2 in interface.py
Browse files Browse the repository at this point in the history
  • Loading branch information
niclaurenti committed Nov 17, 2022
1 parent 7f11afc commit 9a67eeb
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions pinefarm/external/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,17 @@ def annotate_versions(self):
# the pinefarm version will also pin pineappl_py version and all the
# other python dependencies versions
versions["pinefarm"] = __version__
versions["pinecard"] = pygit2.Repository(
configs.configs["paths"]["root"]
).describe(
always_use_long_format=True,
describe_strategy=pygit2.GIT_DESCRIBE_TAGS,
dirty_suffix="-dirty",
show_commit_oid_as_fallback=True,
)
try:
versions["pinecard"] = pygit2.Repository(
configs.configs["paths"]["root"]
).describe(
always_use_long_format=True,
describe_strategy=pygit2.GIT_DESCRIBE_TAGS,
dirty_suffix="-dirty",
show_commit_oid_as_fallback=True,
)
except pygit2.GitError :
versions["pinecard"] = "???"
# TODO: add pineappl version
# pineappl = configs.configs["commands"]["pineappl"]()
versions["pineappl_capi"] = "???"
Expand Down

0 comments on commit 9a67eeb

Please sign in to comment.