Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(935)

Unified Diff: build/android/pylib/device/device_utils.py

Issue 420273006: [Android] Fix DeviceUtils.__str__ when no serial is provided. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 997405a07d6e570d425ceeacbfe382a7c238becb..ef2ddcd8dad5f7dde32589e6c24585cdf84ca8ce 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -790,7 +790,10 @@ class DeviceUtils(object):
def __str__(self):
"""Returns the device serial."""
- return self.old_interface.GetDevice()
+ s = self.old_interface.GetDevice()
+ if not s:
+ s = self.old_interface.Adb().GetSerialNumber()
+ return s
@staticmethod
def parallel(devices=None, async=False):
« no previous file with comments | « no previous file | build/android/pylib/device/device_utils_test.py » ('j') | chrome/test/chromedriver/test/test_environment.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698