Skip to content

Commit 68d136a

Browse files
committed
Fix #1285: Use distro.linux_distribution (python3)
platform.linux_distribution is deprecated in Python3 Signed-off-by: Aline Manera <[email protected]>
1 parent 203ddc4 commit 68d136a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

osinfo.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import copy
2020
import glob
2121
import os
22-
import platform
22+
import distro
2323
from collections import defaultdict
2424
from distutils.version import LooseVersion
2525

@@ -38,7 +38,7 @@
3838
}
3939

4040
# Memory devices slot limits by architecture
41-
HOST_DISTRO = platform.linux_distribution()
41+
HOST_DISTRO = distro.linux_distribution(full_distribution_name=False)
4242
MEM_DEV_SLOTS = {
4343
'ppc64': 32 if HOST_DISTRO and HOST_DISTRO[0] == 'Ubuntu' else 256,
4444
'ppc64le': 32 if HOST_DISTRO and HOST_DISTRO[0] == 'Ubuntu' else 256,

0 commit comments

Comments
 (0)