Fix python3 compatibility issues am: 472d561934

Original change: https://android-review.googlesource.com/c/platform/system/update_engine/+/1621759

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6be9f19702bb56f1e8e21efc4f21ade823338c49