Total Complexity | 0 |
Total Lines | 15 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | # Copyright 2022, Red Hat, Inc. |
||
2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
||
3 | |||
4 | 1 | from os import path |
|
5 | |||
6 | 1 | from pkg_resources import DistributionNotFound, get_distribution |
|
7 | |||
8 | 1 | DISTRIBUTION_NAME = "openscap-report" |
|
9 | 1 | try: |
|
10 | 1 | distribution = get_distribution(DISTRIBUTION_NAME) |
|
11 | except DistributionNotFound: |
||
12 | __version__ = f"Version is unavailable. Please install {DISTRIBUTION_NAME}!" |
||
13 | else: |
||
14 | __version__ = distribution.version |
||
15 |