diff options
author | Haibo Huang <hhb@google.com> | 2019-02-01 15:45:35 -0800 |
---|---|---|
committer | Haibo Huang <hhb@google.com> | 2019-02-01 16:02:53 -0800 |
commit | 38dda433a1917e36ef03b39926a9ff3b2ef89c1b (patch) | |
tree | 4864ff5c582f59ef9bbd09a9a56248b47e59f5e7 | |
parent | 46f2705f13ec692a352e9fac6bdf4c26b877cbee (diff) | |
download | external_updater-38dda433a1917e36ef03b39926a9ff3b2ef89c1b.tar.gz |
[Updater] Send email with only relative path
Test: local run
Change-Id: I1924a07058524eb0bf034dae541a8171e6287f1b
-rw-r--r-- | external_updater.py | 8 | ||||
-rw-r--r-- | notifier.py | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/external_updater.py b/external_updater.py index 749fb21..5e2e944 100644 --- a/external_updater.py +++ b/external_updater.py @@ -129,7 +129,8 @@ def _process_update_result(path): def _check_some(paths, delay): results = {} for path in paths: - results[path] = _process_update_result(path) + relative_path = fileutils.get_relative_project_path(path) + results[relative_path] = _process_update_result(path) time.sleep(delay) return results @@ -141,7 +142,8 @@ def _check_all(delay): if fileutils.METADATA_FILENAME in files: # Skip sub directories. dirs[:] = [] - results[path] = _process_update_result(path) + relative_path = fileutils.get_relative_project_path(path) + results[relative_path] = _process_update_result(path) time.sleep(delay) return results @@ -204,7 +206,7 @@ def _do_update(args): git_utils.push(full_path, args.remote_name) if args.branch_and_commit: - git_utils.checkout(full_path, 'aosp/master') + git_utils.checkout(full_path, args.remote_name + '/master') def parse_args(): diff --git a/notifier.py b/notifier.py index 4391558..455a5b9 100644 --- a/notifier.py +++ b/notifier.py @@ -134,7 +134,7 @@ def send_notification(args): _process_results(args, history, results) with open(args.history, 'w') as f: - json.dump(history, f, sort_keys=True) + json.dump(history, f, sort_keys=True, indent=4) def _upgrade(proj): |