[Yum-devel] [PATCH] Fix a typo. BZ 729964

Zdeněk Pavlas zpavlas at redhat.com
Thu Aug 11 12:34:42 UTC 2011


hasattr(None, 'repos') == False, so we don't need
to check for None explicitly.
---
 .../auto-update-debuginfo/auto-update-debuginfo.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/plugins/auto-update-debuginfo/auto-update-debuginfo.py b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
index 39993ad..9ff927c 100644
--- a/plugins/auto-update-debuginfo/auto-update-debuginfo.py
+++ b/plugins/auto-update-debuginfo/auto-update-debuginfo.py
@@ -38,7 +38,7 @@ def _check_man_disable(mdrs, di):
 def enable_debuginfo_repos(yb, conduit):
     mdrs = set()
     opts, args = conduit.getCmdLine()
-    if opts is not None and hasattr(opts.repos) :
+    if hasattr(opts, 'repos'):
         for opt, repoexp in opts.repos:
             if opt == '--disablerepo':
                 mdrs.add(repoexp)
-- 
1.7.4.4



More information about the Yum-devel mailing list