Use % formatting in logging functions (fixes #1121)
Use int() rather than long() (fixes #1120)
Merge pull request #1135 from chatcannon/pylint

Fix some pylint warnings