[yum-commits] plugins/remove-with-leaves

James Antill james at osuosl.org
Tue Apr 14 14:15:08 UTC 2009


 plugins/remove-with-leaves/remove-with-leaves.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 99b987cb25cb33c7d3525ea654848a16627ba988
Author: James Antill <james at and.org>
Date:   Tue Apr 14 10:14:56 2009 -0400

    Fix remove-with-leaves for PK usage (no opts)

diff --git a/plugins/remove-with-leaves/remove-with-leaves.py b/plugins/remove-with-leaves/remove-with-leaves.py
index f4e3d03..dd3c961 100644
--- a/plugins/remove-with-leaves/remove-with-leaves.py
+++ b/plugins/remove-with-leaves/remove-with-leaves.py
@@ -65,11 +65,11 @@ def postresolve_hook(conduit):
     
     global exclude_bin, remove_always
     opts, commands = conduit.getCmdLine()
-    if hasattr(opts,'exclude_bin'):
+    if opts and hasattr(opts,'exclude_bin'):
         if exclude_bin or opts.exclude_bin:
             exclude_bin = True
             
-    if opts.remove_leaves or remove_always:   
+    if (opts and opts.remove_leaves) or remove_always:
         # get all the items in 
         tsInfo  = conduit.getTsInfo()
         rpmdb = conduit.getRpmDB()


More information about the Yum-commits mailing list