The current script doesn't work under py3. It is using some features that are deprecated in py3. This patch fixes it. Change-Id: I475ebd721c5a49a96f86450d4972ea21a42a50b7 Closes-Bug: #1521837