Skip to content

Commit ab17307

Browse files
committed
Merge branch 'py3' of https://github.com/hubblestack/hubble into python3
2 parents 447ce8e + 277b958 commit ab17307

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

hubblestack/extmods/modules/nova_loader.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ def __bool__(self):
119119
# we are zero if dict is empty and loaded is true
120120
return bool(self._dict or not self.loaded)
121121

122-
def __bool__(self):
122+
def __nonzero__(self):
123123
# we are zero if dict is empty and loaded is true
124-
return self.__nonzero__()
124+
return self.__bool__()
125125

126126
def clear(self):
127127
"""

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)