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

Unified Diff: platform_tools/android/tradefed/upload_dm_results.py

Issue 1073593002: Fail gracefully when dm.json is not present (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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: platform_tools/android/tradefed/upload_dm_results.py
diff --git a/platform_tools/android/tradefed/upload_dm_results.py b/platform_tools/android/tradefed/upload_dm_results.py
index 9aac4075808240f6a1af91588e824e413fb16242..a8ca01e64c601463c6421b36f1cec504f469840d 100755
--- a/platform_tools/android/tradefed/upload_dm_results.py
+++ b/platform_tools/android/tradefed/upload_dm_results.py
@@ -32,6 +32,9 @@ def main(dm_dir, build_number, builder_name):
gs_utils.GSUtils.Permission.READ
)]
+ if not os.path.isfile(os.path.join(dm_dir, 'dm.json')):
+ sys.exit("no dm.json file found in output directory.")
+
# Move dm.json to its own directory to make uploading it easier.
tmp = tempfile.mkdtemp()
shutil.move(os.path.join(dm_dir, 'dm.json'),
« 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