[blivet:master 6/9] Suppress false positive W0631 error.

mulhern amulhern at redhat.com
Thu Apr 3 17:32:11 UTC 2014


The only way the else branch is not executed is if the break statement is
encountered. Since the else branch exits the only way this line can be
reached is if the break statement is encountered. But for the break
statement to be encountered, enumerate lines must be non-empty, and
therefore i,l must have been assigned to when the line is reached.

Not putting in pylint-false-positives because this may prove to be beyond
the scope of the W0631 analysis.

Signed-off-by: mulhern <amulhern at redhat.com>
---
 scripts/makebumpver | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/makebumpver b/scripts/makebumpver
index 2d5a2bb..fe65849 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -377,6 +377,7 @@ class MakeBumpVer:
             print "!!! Failed to replace '%s' with '%s'" % (search, replace)
             sys.exit(1)
 
+        # pylint: disable=W0631
         lines[i] = re.sub(search, replace, lines[i])
 
     def _writeNewSpec(self, newVersion, rpmlog):
-- 
1.8.3.1



More information about the anaconda-patches mailing list