Remove remote if it is not consistent with METADATA
Change-Id: I3166b87445dfdd5f3966086e32f71e7f6e69e730
diff --git a/notifier.py b/notifier.py
index 12daeb2..d061181 100644
--- a/notifier.py
+++ b/notifier.py
@@ -31,28 +31,27 @@
import git_utils
+
def parse_args():
"""Parses commandline arguments."""
parser = argparse.ArgumentParser(
description='Check updates for third party projects in external/.')
- parser.add_argument(
- '--history',
- help='Path of history file. If doesn'
- 't exist, a new one will be created.')
+ parser.add_argument('--history',
+ help='Path of history file. If doesn'
+ 't exist, a new one will be created.')
parser.add_argument(
'--recipients',
help='Comma separated recipients of notification email.')
parser.add_argument(
'--generate_change',
help='If set, an upgrade change will be uploaded to Gerrit.',
- action='store_true', required=False)
- parser.add_argument(
- 'paths', nargs='*',
- help='Paths of the project.')
- parser.add_argument(
- '--all', action='store_true',
- help='Checks all projects.')
+ action='store_true',
+ required=False)
+ parser.add_argument('paths', nargs='*', help='Paths of the project.')
+ parser.add_argument('--all',
+ action='store_true',
+ help='Checks all projects.')
return parser.parse_args()
@@ -89,10 +88,12 @@
msg += '\n\n'
msg += upgrade_log
- subprocess.run(['sendgmr', '--to=' + recipient,
- '--subject=' + proj], check=True,
- stdout=subprocess.PIPE, stderr=subprocess.PIPE,
- input=msg, encoding='ascii')
+ subprocess.run(['sendgmr', '--to=' + recipient, '--subject=' + proj],
+ check=True,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
+ input=msg,
+ encoding='ascii')
NOTIFIED_TIME_KEY_NAME = 'latest_notified_time'
@@ -155,10 +156,12 @@
def _upgrade(proj):
- out = subprocess.run(['out/soong/host/linux-x86/bin/external_updater',
- 'update', '--branch_and_commit', '--push_change',
- proj],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE,
+ out = subprocess.run([
+ 'out/soong/host/linux-x86/bin/external_updater', 'update',
+ '--branch_and_commit', '--push_change', proj
+ ],
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
cwd=_get_android_top())
stdout = out.stdout.decode('utf-8')
stderr = out.stderr.decode('utf-8')
@@ -175,9 +178,10 @@
def _check_updates(args):
- params = ['out/soong/host/linux-x86/bin/external_updater',
- 'check', '--json_output', RESULT_FILE_PATH,
- '--delay', '30']
+ params = [
+ 'out/soong/host/linux-x86/bin/external_updater', 'check',
+ '--json_output', RESULT_FILE_PATH, '--delay', '30'
+ ]
if args.all:
params.append('--all')
else: