From 2ff301874b18a2d96256827a31de96e2be1da253 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Wed, 23 Mar 2016 09:52:51 +0000 Subject: [PATCH] depot_tools: remove code for --trybot-json It was added in https://codereview.chromium.org/112503005 for https://bugs.chromium.org/p/chromium/issues/detail?id=278558 , but we ended up implementing the functionality in different way. BUG=583578 Review URL: https://codereview.chromium.org/1825063003 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299433 0039d316-1c4b-4281-b951-d872f2087c98 --- presubmit_support.py | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/presubmit_support.py b/presubmit_support.py index 3f873c0d8..2b01bc356 100755 --- a/presubmit_support.py +++ b/presubmit_support.py @@ -1650,6 +1650,7 @@ def main(argv=None): parser.add_option("--rietveld_email_file", help=optparse.SUPPRESS_HELP) parser.add_option("--rietveld_private_key_file", help=optparse.SUPPRESS_HELP) + # TODO(phajdan.jr): Update callers and remove obsolete --trybot-json . parser.add_option("--trybot-json", help="Output trybot information to the file specified.") auth.add_auth_options(parser) @@ -1696,32 +1697,6 @@ def main(argv=None): options.description = props['description'] logging.info('Got author: "%s"', options.author) logging.info('Got description: """\n%s\n"""', options.description) - if options.trybot_json: - with open(options.trybot_json, 'w') as f: - # Python's sets aren't JSON-encodable, so we convert them to lists here. - class SetEncoder(json.JSONEncoder): - # pylint: disable=E0202 - def default(self, obj): - if isinstance(obj, set): - return sorted(obj) - return json.JSONEncoder.default(self, obj) - change = change_class(options.name, - options.description, - options.root, - files, - options.issue, - options.patchset, - options.author, - upstream=options.upstream) - trybots = DoGetTrySlaves( - change, - change.LocalPaths(), - change.RepositoryRoot(), - None, - None, - options.verbose, - sys.stdout) - json.dump(trybots, f, cls=SetEncoder) try: with canned_check_filter(options.skip_canned): results = DoPresubmitChecks(