Mercurial > treepkg
changeset 332:e0e99b71932b
Added check in readconfig if either a git_url or a svn_url is provided
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 17 Mar 2010 15:34:43 +0000 |
parents | e2d04687aa5a |
children | cbf372f07daa |
files | treepkg/readconfig.py |
diffstat | 1 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/treepkg/readconfig.py Wed Mar 17 15:28:33 2010 +0000 +++ b/treepkg/readconfig.py Wed Mar 17 15:34:43 2010 +0000 @@ -132,6 +132,18 @@ packager_class = parser.get(section, "packager_class", vars=vars) module = packager.import_packager_module(packager_class) desc = packager_desc + module.PackageTrack.extra_config_desc + packager_options = (read_config_section(parser, section, desc, + defaults=vars)) + if not packager_options.get("svn_url") \ + and not packager_options.get('git_url'): + print >>sys.stderr, "Missing repository URL in section %r" \ + % (section) + sys.exit(1) + elif packager_options.get("svn_url") \ + and packager_options.get('git_url'): + print >>sys.stderr, \ + "Warning: git_url in section %r will be ignored" \ + % (section) packagers.append(read_config_section(parser, section, desc, defaults=vars))