createrepo/__init__.py

[email protected]
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit a8f408cdaa993cc5485ab8d1ce587c4b1e3d8e9b
Author: Seth Vidal <[email protected]>
Date:   Wed Apr 21 12:59:58 2010 -0400

    when the update_md_path doesn't exist - emit a warning of some kind - rather than a somewhat quieter message from MetadataIndex()
    
    this is mostly to help jesse b/c he asked nicely

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index e2402ae..a786955 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -337,7 +337,11 @@ class MetaDataGenerator:
                 opts['do_stat'] = False
 
             if self.conf.update_md_path:
-                old_repo_path = os.path.normpath(self.conf.update_md_path)
+                norm_u_md_path = os.path.normpath(self.conf.update_md_path)
+                if not os.path.exists(norm_u_md_path):
+                    msg = _('Warning: could not open update_md_path: %s') %  norm_u_md_path
+                    self.callback.errorlog(msg)
+                old_repo_path = os.path.normpath(norm_u_md_path)
             else:
                 old_repo_path = self.conf.outputdir
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.