Skip to content

Commit 277b958

Browse files
authored
Merge pull request #754 from daveed12/py3
platform.linux_distribution() & platform.dist() replaced with distro.linux_distribution()
2 parents b95fba0 + 203fb68 commit 277b958

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

hubblestack/files/hubblestack_nova/grep.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def audit(data_list, tags, labels, debug=False, **kwargs):
175175
if not os.path.exists(name) and 'match_on_file_missing' in tag_data:
176176
if tag_data['match_on_file_missing']:
177177
found = True
178-
failure_reason = "Found the file '{0}'. This blaclisted file " \
178+
failure_reason = "Found the file '{0}'. This blacklisted file " \
179179
"should not exist.".format(name)
180180
else:
181181
found = False

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
ntplib
2+
distro
23
pyinstaller==3.3.1
34
Crypto
45
pyopenssl>=16.2.0

setup.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
from setuptools import setup, find_packages
2-
import platform
32
import re
43

5-
distro, version, _ = platform.dist()
6-
if not distro:
7-
distro, version, _ = platform.linux_distribution(supported_dists=['system'])
4+
try:
5+
import distro
6+
distro, version, _ = distro.linux_distribution(full_distribution_name=False)
7+
except ModuleNotFoundError:
8+
distro = version = ''
89

9-
# Default to cent7
10+
# Default to CentOS7
1011
data_files = [('/usr/lib/systemd/system', ['pkg/source/hubble.service']),
1112
('/etc/hubble', ['conf/hubble']), ]
1213

0 commit comments

Comments
 (0)