releasetools: Make common Python 3 compatible.
Bug: 131631303 Test: TreeHugger Test: `python -m unittest test_common` Test: `python3 -m unittest test_common` Change-Id: I409fe30a5d71975c1d7b66e5e749843de530f1f9
This commit is contained in:
@@ -44,7 +44,7 @@ def _ReadFile(file_name, unpacked_name, round_up=False):
|
||||
"""Constructs and returns a File object. Rounds up its size if needed."""
|
||||
|
||||
assert os.path.exists(unpacked_name)
|
||||
with open(unpacked_name, 'r') as f:
|
||||
with open(unpacked_name, 'rb') as f:
|
||||
file_data = f.read()
|
||||
file_size = len(file_data)
|
||||
if round_up:
|
||||
|
Reference in New Issue
Block a user