Passed
Pull Request — master (#80)
by Jan
08:35
created

openscap_report   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 70%

Importance

Changes 0
Metric Value
wmc 0
eloc 13
dl 0
loc 19
ccs 7
cts 10
cp 0.7
rs 10
c 0
b 0
f 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