[yum-cvs] yum-utils/plugins/changelog changelog.py,1.6,1.7

Panu Matilainen pmatilai at login.linux.duke.edu
Tue Sep 6 19:19:37 UTC 2005


Update of /home/groups/yum/cvs/yum-utils/plugins/changelog
In directory login:/tmp/cvs-serv29977/plugins/changelog

Modified Files:
	changelog.py 
Log Message:
Avoid causing tracebacks with yumex and pup which don't use ConfigParser


Index: changelog.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/plugins/changelog/changelog.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- changelog.py	23 Aug 2005 16:10:32 -0000	1.6
+++ changelog.py	6 Sep 2005 19:19:35 -0000	1.7
@@ -65,7 +65,8 @@
 
 def config_hook(conduit):
     parser = conduit.getOptParser()
-    parser.add_option('--changelog', action='store_true', 
+    if parser:
+        parser.add_option('--changelog', action='store_true', 
                       help='Show changelog delta of updated packages')
 
     conduit.registerOpt('when', PLUG_OPT_STRING, PLUG_OPT_WHERE_MAIN, 'post')
@@ -73,7 +74,8 @@
 def postreposetup_hook(conduit):
     global changelog
     opts, args = conduit.getCmdLine()
-    changelog = opts.changelog
+    if opts:
+        changelog = opts.changelog
 
     if changelog:
         repos = conduit.getRepos()




More information about the Yum-cvs-commits mailing list