# HG changeset patch # User Jeff Hammel # Date 1357684213 28800 # Node ID 3a7e8aa80328348ff7c60972122a2524121bd2dc # Parent 61d2bb7a3ca0bda191c9283d5d693c2c4ffd0b86 move this to an instance method for consumption diff -r 61d2bb7a3ca0 -r 3a7e8aa80328 mozillatry.py --- a/mozillatry.py Tue Jan 08 14:10:31 2013 -0800 +++ b/mozillatry.py Tue Jan 08 14:30:13 2013 -0800 @@ -174,25 +174,29 @@ if key in self.option_dict]) return config + ### methods for try on mozilla-central + + def try_syntax(self): + return try_syntax(opt=self.config.get('opt'), + debug=self.config.get('debug'), + unittests=self.config.get('unittests', []), + talos=self.config.get('talostests', []), + bug=self.config.get('bug')) + def main(args=sys.argv[1:]): # parse command line arguments - parser = MozillaTryConfiguration() - options, args = parser.parse_args() + mozillatry = MozillaTryConfiguration() + options, args = mozillatry.parse_args() if not args: - parser.print_usage() - parser.exit() + mozillatry.print_usage() + mozillatry.exit() # get mozilla-central repository directory try_directory = options.mozilla_central # build try syntax - commit = try_syntax(opt=options.opt, - debug=options.debug, - unittests=options.unittests, - talos=options.talostests, - bug=options.bug - ) + commit = mozillatry.try_syntax() print commit # push to try