1
0
Fork 0

commands: Fix chassis type matching

Resolves: rhbz#1565598

Signed-off-by: Ondřej Lysoněk <olysonek@redhat.com>
This commit is contained in:
Ondřej Lysoněk 2018-10-09 18:00:19 +02:00
parent ac29201fc7
commit 0fe5bc76d0

View file

@ -421,7 +421,7 @@ class commands:
match = False
elif option == "chassis_type":
for chassis in dmidecode.chassis().values():
chassis_type = chassis["data"]["Type"]
chassis_type = chassis["data"]["Type"].decode("ascii")
if re.match(value, chassis_type, re.IGNORECASE):
break
else: