Always use except Exception as e instead of Exception, e

Change-Id: Iab67e2c79c9ace74cbf1d55fcd4dd17e6293f5f1
Replace print statements by pywikibot.output

Change-Id: I1003d927d27a7c77a7aecda086f6737d3c225ebe