# HG changeset patch # User Jeff Hammel # Date 1354667393 28800 # Node ID 06b8783eae8195d678f86771cceadb89f3d75c15 # Parent 1e90d869f7872fb75c1a541cf7764e56adceda95 move another check to validate diff -r 1e90d869f787 -r 06b8783eae81 mozillatry.py --- a/mozillatry.py Tue Dec 04 16:25:31 2012 -0800 +++ b/mozillatry.py Tue Dec 04 16:29:53 2012 -0800 @@ -104,6 +104,10 @@ if (not self.config.get('opt')) and (not self.config.get('debug')): raise ConfigurationError("Must have opt or debug builds") + try_directory = self.config.get('mozilla_central') + if (try_directory is None) or (not os.path.exists(try_directory)): + parser.error("mozilla-central directory does not exist: %s" % try_directory) + def configuration_files(self, options, args): configuration_files = configuration.Configuration.configuration_files(self, options, args) if not configuration_files: @@ -131,8 +135,6 @@ # get mozilla-central repository directory try_directory = options.mozilla_central - if (try_directory is None) or (not os.path.exists(try_directory)): - parser.error("mozilla-central directory does not exist: %s" % try_directory) # build try syntax commit = try_syntax(opt=options.opt, @@ -143,7 +145,7 @@ print commit # push to try - push_to_try(patches=args, repo=try_directory, commit=commit) + push_to_try(patches=args, repo=options.mozilla_central, commit=commit) if __name__ == '__main__': main()