Mercurial > mozilla > hg > MozillaTry
comparison mozillatry.py @ 9:8c8a223e4df2
begin to read config file
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 04 Dec 2012 15:13:26 -0800 |
parents | 7423fa8b4343 |
children | f0bca08e296a |
comparison
equal
deleted
inserted
replaced
8:7423fa8b4343 | 9:8c8a223e4df2 |
---|---|
71 class ConfigurationError(Exception): | 71 class ConfigurationError(Exception): |
72 """error when checking configuration""" | 72 """error when checking configuration""" |
73 | 73 |
74 class MozillaTryConfiguration(configuration.Configuration): | 74 class MozillaTryConfiguration(configuration.Configuration): |
75 | 75 |
76 default_config_file = os.path.join('~', '.mozutils.yaml') | |
76 usage = '%prog [options] patch <patch2> <...>' | 77 usage = '%prog [options] patch <patch2> <...>' |
78 load_help = 'load from config file' | |
79 if os.path.exists(os.path.expanduser(default_config_file)): | |
80 usage += ' [DEFAULT: %s]' % default_config_file | |
77 options = {'opt': {'default': True, | 81 options = {'opt': {'default': True, |
78 'help': "whether to try on opt builds"}, | 82 'help': "whether to try on opt builds"}, |
79 'debug': {'default': True, | 83 'debug': {'default': True, |
80 'help': "whether to try on debug builds"}, | 84 'help': "whether to try on debug builds"}, |
81 'unittests': {'default': [], | 85 'unittests': {'default': [], |