build: minor fix for python3 compatibility.

refs #1302 note #12

Change-Id: I31563a9b3e293784329538bcbe41190d0b63ac29