Merge "Fixed bug 256013 and bug 256103, thanks to William Arlofski, Michael A. Smith...
authorrbu <rbu@gentoo.org>
Mon, 25 May 2009 21:44:52 +0000 (21:44 -0000)
committerrbu <rbu@gentoo.org>
Mon, 25 May 2009 21:44:52 +0000 (21:44 -0000)
This was r579 by idl0r, but applied to the wrong paths in trunk.

From: idl0r <idl0r@e84c3a59-eaf8-0310-85df-8a9fcd7b4891>
Date: Mon, 4 May 2009 22:10:26 +0000
Subject: Fixed bug 256013 and bug 256103, thanks to William Arlofski,
Michael A. Smith and Andrey Kislyuk. Whitespace.

 git-svn-id:
 svn://anonsvn.gentoo.org/gentoolkit/trunk/src/glsa-check@579
 e84c3a59-eaf8-0310-85df-8a9fcd7b4891

svn path=/trunk/gentoolkit/; revision=653

man/glsa-check.1
pym/gentoolkit/glsa/__init__.py

index e31e3392d3085e268f4c267f0dc7916f3f977002..eee5151bc60bf6a8fe4b63bf361f81822f943a1f 100644 (file)
@@ -12,7 +12,7 @@ glsa\-check <\fIoption\fP> [\fIglsa\-list\fP]
 This tool is used to locally monitor and manage Gentoo Linux Security Advisories.
 Please read:
 .br 
-http://www.gentoo.org/proj/en/portage/glsa\-integration.xml
+http://www.gentoo.org/security
 .br 
 before reporting a bug.
 .LP
index d28383527c3da42b9a3aec7ae42f9eb6c3e7ddb7..7d8895f683ae0afc7679efeed6032aeb38ecef0a 100644 (file)
@@ -22,7 +22,7 @@ import operator
 import xml.dom.minidom
 from StringIO import StringIO
 
-if sys.version_info[0:2] < (2,3):
+if sys.version_info[0:2] < (2, 3):
        raise NotImplementedError("Python versions below 2.3 have broken XML code " \
                                                                +"and are not supported")
 
@@ -33,8 +33,8 @@ except ImportError:
        import portage
 
 # Note: the space for rgt and rlt is important !!
-opMapping = {"le": "<=", "lt": "<", "eq": "=", "gt": ">", "ge": ">=", 
-                        "rge": ">=~", "rle": "<=~", "rgt": " >~", "rlt": " <~"}
+opMapping = {"le": "<=", "lt": "<", "eq": "=", "gt": ">", "ge": ">=",
+               "rge": ">=~", "rle": "<=~", "rgt": " >~", "rlt": " <~"}
 NEWLINE_ESCAPE = "!;\\n"       # some random string to mark newlines that should be preserved
 SPACE_ESCAPE = "!;_"           # some random string to mark spaces that should be preserved
 
@@ -589,7 +589,7 @@ class Glsa:
                self.packages = {}
                for p in self.affected.getElementsByTagName("package"):
                        name = p.getAttribute("name")
-                       if not self.packages.has_key(name):
+                       if not name in self.packages:
                                self.packages[name] = []
                        tmp = {}
                        tmp["arch"] = p.getAttribute("arch")