Fix build failure with python3

Task-number: QTBUG-33692
Change-Id: I9f0bd6411e42b7ca06710dd47e3bcae4d2605c81
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>