Skip to content

Commit ca3ea70

Browse files
committed
Display pygit2 version in About dialog and --long-version
1 parent 7c89da2 commit ca3ea70

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

picard/util/versions.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,21 @@
5353
'discid-version': "Discid",
5454
'astrcmp': "astrcmp",
5555
'ssl-version': "SSL",
56+
'pygit2-version': "pygit2",
5657
}
5758

5859

5960
def _load_versions():
6061
global _versions
62+
63+
# Get pygit2 version if available
64+
try:
65+
import pygit2
66+
67+
pygit2_version = pygit2.__version__
68+
except ImportError:
69+
pygit2_version = None
70+
6171
_versions = OrderedDict(
6272
(
6373
('version', PICARD_FANCY_VERSION_STR),
@@ -68,6 +78,7 @@ def _load_versions():
6878
('discid-version', discid_version),
6979
('astrcmp', astrcmp_implementation),
7080
('ssl-version', QSslSocket.sslLibraryVersionString()),
81+
('pygit2-version', pygit2_version),
7182
)
7283
)
7384

0 commit comments

Comments
 (0)