createrepo/__init__.py genpkgmetadata.py

[email protected] (Seth Vidal)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py |    2 +-
 genpkgmetadata.py      |    2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 3195518cbb0fb4341d4ab17f7cf7c145f747b2ee
Author: Seth Vidal <[email protected]>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.