Total Complexity | 0 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 70% |
Changes | 0 |
1 | # Copyright 2022, Red Hat, Inc. |
||
2 | # SPDX-License-Identifier: LGPL-2.1-or-later |
||
3 | |||
4 | 1 | import logging |
|
5 | 1 | from os import path |
|
6 | |||
7 | 1 | from pkg_resources import DistributionNotFound, get_distribution |
|
8 | |||
9 | 1 | DISTRIBUTION_NAME = "openscap-report" |
|
10 | 1 | try: |
|
11 | 1 | distribution = get_distribution(DISTRIBUTION_NAME) |
|
12 | except DistributionNotFound: |
||
13 | logging.warning( |
||
14 | "Value of __version__ is default. Package is not installed! Please install %s!", |
||
15 | DISTRIBUTION_NAME) |
||
16 | __version__ = "0.0.0" |
||
17 | else: |
||
18 | __version__ = distribution.version |
||
19 |