Fixed unbound variable problem.

Variable "to_be_deletes" may not be initialized in cases
where os.write before its initialization fails.
Fixed by moving out initialization out of the try block.

Also fixed a few pylint warnings.

BUG=chromium:526186
TEST=None

Change-Id: I0aaada439d9145c0f37fae877b82a03ddb4fb476
Reviewed-on: https://chrome-internal-review.googlesource.com/228503
Commit-Ready: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
Reviewed-by: Caroline Tice <cmtice@google.com>
1 file changed