Skip to content

Commit 5467e20

Browse files
committed
Work around deprecation of platform.dist() in recent python
1 parent 1d091ab commit 5467e20

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

setup.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,14 @@ def run(self):
9494
['desktop/icons/24x24/pybitmessage.png'])
9595
]
9696

97-
if platform.dist()[0] in ('Debian', 'Ubuntu'):
98-
data_files += [
99-
("etc/apparmor.d/",
100-
['packages/apparmor/pybitmessage'])
101-
]
97+
try:
98+
if platform.dist()[0] in ('Debian', 'Ubuntu'):
99+
data_files += [
100+
("etc/apparmor.d/",
101+
['packages/apparmor/pybitmessage'])
102+
]
103+
except AttributeError:
104+
pass # FIXME: use distro for more recent python
102105

103106
dist = setup(
104107
name='pybitmessage',

0 commit comments

Comments
 (0)