[Rpm-metadata] createrepo/__init__.py genpkgmetadata.py

Seth Vidal skvidal at linux.duke.edu
Tue Jan 29 15:07:49 UTC 2008


 createrepo/__init__.py |    2 +-
 genpkgmetadata.py      |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3195518cbb0fb4341d4ab17f7cf7c145f747b2ee
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Tue Jan 29 10:06:12 2008 -0500

    make sure things work out as the right default

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 0d36c89..1df6923 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -57,7 +57,7 @@ class MetaDataConfig(object):
         self.quiet = False
         self.verbose = False
         self.excludes = []
-        self.baseurl = ''
+        self.baseurl = None
         self.groupfile = None
         self.sumtype = 'sha'
         self.noepoch = False # hmm - maybe a fixme?
diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index 6b9560f..9d60dae 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -111,6 +111,8 @@ def parseArgs(args, conf):
     for opt in parser.option_list:
         if opt.dest is None: # this is fairly silly
             continue
+        if getattr(opts, opt.dest) is None: # if it's not set, take the default from the base class
+            continue
         setattr(conf, opt.dest, getattr(opts, opt.dest))
     
     directory = directories[0]



More information about the Rpm-metadata mailing list