Fix python3 compatibility issues am: 472d561934 am: 8e56128a1b

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie7b1d63e5afc2ff7ba6c4fee01c88cf590242d68