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

Unified Diff: build/android/device_status_check.py

Issue 10962022: Android device status: create out dir if needed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/device_status_check.py
diff --git a/build/android/device_status_check.py b/build/android/device_status_check.py
index 673fbe83ed3df725798632ee1e77dfb2de7fbd8c..b3447cae0f42bbb3e6bd1521baf13c48e5b7b8e8 100755
--- a/build/android/device_status_check.py
+++ b/build/android/device_status_check.py
@@ -58,9 +58,8 @@ def CheckForMissingDevices(options, adb_online_devs):
adb_online_devs: A list of serial numbers of the currently visible
and online attached devices.
"""
-
- last_devices_path = os.path.abspath(os.path.join(options.out_dir,
- '.last_devices'))
+ out_dir = os.path.abspath(options.out_dir)
+ last_devices_path = os.path.join(out_dir, '.last_devices')
last_devices = []
try:
with open(last_devices_path) as f:
@@ -89,8 +88,10 @@ def CheckForMissingDevices(options, adb_online_devs):
print ('New devices detected %s. And now back to your '
'regularly scheduled program.' % list(new_devs))
- # Write devices currently visible plus devices previously seen.
+ if not os.path.exists(out_dir):
+ os.makedirs(out_dir)
with open(last_devices_path, 'w') as f:
+ # Write devices currently visible plus devices previously seen.
f.write('\n'.join(set(adb_online_devs + last_devices)))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698