Skip to content

Commit

Permalink
decode
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamgilbert committed Nov 15, 2021
1 parent fc70163 commit 9bffc03
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion payload/usr/local/sal/checkin_modules/machine_checkin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,13 @@ def get_friendly_model(serial, udid):
try:
data = plistlib.loads(out)
if len(data) != 0:
return data[0].get("product-name").encode("ascii", "ignore").strip()
return (
data[0]
.get("product-name")
.encode("ascii", "ignore")
.decode()
.strip()
)
except:
pass

Expand Down

0 comments on commit 9bffc03

Please sign in to comment.