Index: build/android/provision_devices.py |
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
index 0a7f8fd770f8b24a6ca464942a0a9d148229753a..3d9db7286d68ed3757e1c34c9a133327afc82365 100755 |
--- a/build/android/provision_devices.py |
+++ b/build/android/provision_devices.py |
@@ -81,7 +81,7 @@ def ProvisionDevices(args): |
def ProvisionDevice(device, blacklist, options): |
if options.reboot_timeout: |
reboot_timeout = options.reboot_timeout |
- elif (device.build_version_sdk >= version_codes.LOLLIPOP): |
+ elif device.build_version_sdk >= version_codes.LOLLIPOP: |
reboot_timeout = _DEFAULT_TIMEOUTS.LOLLIPOP |
else: |
reboot_timeout = _DEFAULT_TIMEOUTS.PRE_LOLLIPOP |
@@ -195,7 +195,7 @@ def WipeDevice(device, options): |
adb_public_keys = f.readlines() |
adb_keys_set.update(adb_public_keys) |
except IOError: |
- logging.warning('Unable to find adb keys file %s.' % adb_key_file) |
+ logging.warning('Unable to find adb keys file %s.', adb_key_file) |
_WriteAdbKeysFile(device, '\n'.join(adb_keys_set)) |
except device_errors.CommandFailedError: |
logging.exception('Possible failure while wiping the device. ' |
@@ -299,7 +299,7 @@ def FinishProvisioning(device, options): |
logging.exception('Unable to let battery cool to specified temperature.') |
def _set_and_verify_date(): |
- if (device.build_version_sdk >= version_codes.MARSHMALLOW): |
+ if device.build_version_sdk >= version_codes.MARSHMALLOW: |
date_format = '%m%d%H%M%Y.%S' |
set_date_command = ['date'] |
else: |
@@ -329,7 +329,7 @@ def FinishProvisioning(device, options): |
props = device.RunShellCommand('getprop', check_return=True) |
for prop in props: |
- logging.info(' %s' % prop) |
+ logging.info(' %s', prop) |
if options.auto_reconnect: |
_PushAndLaunchAdbReboot(device, options.target) |
@@ -356,7 +356,7 @@ def _PushAndLaunchAdbReboot(device, target): |
target: The build target (example, Debug or Release) which helps in |
locating the adb_reboot binary. |
""" |
- logging.info('Will push and launch adb_reboot on %s' % str(device)) |
+ logging.info('Will push and launch adb_reboot on %s', str(device)) |
# Kill if adb_reboot is already running. |
device.KillAll('adb_reboot', blocking=True, timeout=2, quiet=True) |
# Push adb_reboot |