1
0
Fork 0

recommend: use dmidecode only on x86(64)

Resolves: rhbz#1688371

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
This commit is contained in:
Jaroslav Škarvada 2019-03-14 15:44:47 +01:00
parent 033e35b4c4
commit 9d83b77572
No known key found for this signature in database
GPG key ID: D8E1C00E076E840B

View file

@ -2,15 +2,16 @@ import os
import re
import errno
import procfs
import platform
from configobj import ConfigObj, ConfigObjError
have_dmidecode = False
try:
if (os.getuid() == 0):
if (os.getuid() == 0 and platform.machine() in ["i386", "i486", "i586", "i686", "x86_64"]):
import dmidecode
have_dmidecode = True
else:
have_dmidecode = False
except:
have_dmidecode = False
pass
try:
import syspurpose.files
have_syspurpose = True