From: "Brian C. Lane" <bcl(a)redhat.com>
If it can't be decoded it certainly isn't a Mac.
---
blivet/arch.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/blivet/arch.py b/blivet/arch.py
index 7759963..dd4a9f3 100644
--- a/blivet/arch.py
+++ b/blivet/arch.py
@@ -224,8 +224,11 @@ def isMactel():
elif not os.path.isfile(DMI_CHASSIS_VENDOR):
mactel = False
else:
- buf = open(DMI_CHASSIS_VENDOR).read()
- mactel = ("apple" in buf.lower())
+ try:
+ buf = open(DMI_CHASSIS_VENDOR).read()
+ mactel = ("apple" in buf.lower())
+ except UnicodeDecodeError:
+ mactel = False
return mactel
def isEfi():
--
To view this commit on github, visit
https://github.com/rhinstaller/blivet/commit/79535585b59dd11509a893c338a7...