changeset 445:e049599fde1a

Default to treepkg.packager if no packager class is given
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 09 Aug 2010 12:25:41 +0000
parents cb061f0474ba
children bee2e5f6cf8d
files treepkg/readconfig.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/treepkg/readconfig.py	Mon Aug 09 12:24:56 2010 +0000
+++ b/treepkg/readconfig.py	Mon Aug 09 12:25:41 2010 +0000
@@ -69,7 +69,7 @@
     ("svn_url", str,""),
     ("svn_subset", convert_subversion_subset, ""),
     ("svn_externals", shlex.split, ""),
-    ("rules_svn_url", str, ""), "packager_class",
+    ("rules_svn_url", str, ""), ("packager_class", str, "treepkg.packager"),
     ("root_cmd", shlex.split, "sudo"), "builderconfig",
     "deb_email", "deb_fullname", ("deb_build_options", str, ""),
     ("version_template", str, "%(revision)s"),
@@ -138,7 +138,11 @@
     for section in parser.sections():
         if section.startswith("pkg_"):
             vars = dict(name=section[4:])
-            packager_class = parser.get(section, "packager_class", vars=vars)
+            try:
+                packager_class = parser.get(section, "packager_class",
+                                            vars=vars)
+            except NoOptionError:
+                packager_class = "treepkg.packager"
             module = packager.import_packager_module(packager_class)
             desc = packager_desc + module.PackageTrack.extra_config_desc
             packager_options = read_config_section(parser, section, desc,
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)