upload.py: pyflakes fixes
upload.py: pyflakes fixes

- undefined name 'rlen'
- undefined name '_contents'
- local variable 'e' is assigned to but never used

Change-Id: I3a8f069d32c9d9a209536adf081cf11420908414

emijrp/pywikibot-core,npdoty/pywikibot,smalyshev/pywikibot-core,magul/pywikibot-core,happy5214/pywikibot-core,xZise/pywikibot-core,magul/pywikibot-core,h4ck3rm1k3/pywikibot-core,PersianWikipedia/pywikibot-core,happy5214/pywikibot-core,TridevGuha/pywikibot-core,wikimedia/pywikibot-core,darthbhyrava/pywikibot-local,trishnaguha/pywikibot-core,hasteur/g13bot_tools_new,Darkdadaah/pywikibot-core,icyflame/batman,valhallasw/pywikibot-core,h4ck3rm1k3/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,npdoty/pywikibot,wikimedia/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,Darkdadaah/pywikibot-core,VcamX/pywikibot-core