Fix for board-id retrieval on VM (#6)

This commit is contained in:
Austin Culter 2019-05-08 13:57:16 -06:00 committed by Graham R Pugh
parent 1bfd0c71b7
commit 9e35978b72

View File

@ -60,7 +60,7 @@ def get_board_id():
ioreg_output = subprocess.check_output(ioreg_cmd).splitlines() ioreg_output = subprocess.check_output(ioreg_cmd).splitlines()
for line in ioreg_output: for line in ioreg_output:
if 'board-id' in line: if 'board-id' in line:
board_id = line.split(" ")[-1] board_id = line.split("<")[-1]
board_id = board_id[board_id.find('<"')+2:board_id.find('">')] board_id = board_id[board_id.find('<"')+2:board_id.find('">')]
return board_id return board_id
except subprocess.CalledProcessError, err: except subprocess.CalledProcessError, err: