Tools/scripts/patchtool: adjust for Python 3
PR: 246414 Submitted by: ashish Event: July 2020 Bugathon