build: Small fix to support Python3

Change-Id: I8e6218522ee9f03c9d9ee6357609f9003cc0cbad
Refs: #1302