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'), |