Skip to content

Commit

Permalink
Fix #1285: Use distro.linux_distribution (python3)
Browse files Browse the repository at this point in the history
platform.linux_distribution is deprecated in Python3

Signed-off-by: Aline Manera <aline.manera@gmail.com>
  • Loading branch information
alinefm committed Dec 4, 2019
1 parent 203ddc4 commit 68d136a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions osinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import copy
import glob
import os
import platform
import distro
from collections import defaultdict
from distutils.version import LooseVersion

Expand All @@ -38,7 +38,7 @@
}

# Memory devices slot limits by architecture
HOST_DISTRO = platform.linux_distribution()
HOST_DISTRO = distro.linux_distribution(full_distribution_name=False)
MEM_DEV_SLOTS = {
'ppc64': 32 if HOST_DISTRO and HOST_DISTRO[0] == 'Ubuntu' else 256,
'ppc64le': 32 if HOST_DISTRO and HOST_DISTRO[0] == 'Ubuntu' else 256,
Expand Down

0 comments on commit 68d136a

Please sign in to comment.