Passed
Pull Request — master (#80)
by Jan
07:27
created

openscap_report   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 0
eloc 9
dl 0
loc 15
ccs 6
cts 8
cp 0.75
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
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