upload.py: pyflakes fixes

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

Change-Id: I3a8f069d32c9d9a209536adf081cf11420908414
Merge "upload.py: pyflakes fixes"