I'd have a look at that before merging.
Using str with the python3 looks suspect as is the line before.