diff options
author | idl0r <idl0r@gentoo.org> | 2009-05-04 22:10:26 +0000 |
---|---|---|
committer | idl0r <idl0r@gentoo.org> | 2009-05-04 22:10:26 +0000 |
commit | bd7392b83238c81f388739533d02cc497f231abb (patch) | |
tree | e1488e47f729a2a508ad9fe009b5fece80e61f56 | |
parent | Fixed keyword sorting. (diff) | |
download | gentoolkit-bd7392b83238c81f388739533d02cc497f231abb.tar.gz gentoolkit-bd7392b83238c81f388739533d02cc497f231abb.tar.bz2 gentoolkit-bd7392b83238c81f388739533d02cc497f231abb.zip |
Fixed bug 256013 and bug 256103, thanks to William Arlofski, Michael A. Smith and Andrey Kislyuk.
Whitespace.
svn path=/; revision=579
-rwxr-xr-x | trunk/src/glsa-check/glsa-check | 8 | ||||
-rw-r--r-- | trunk/src/glsa-check/glsa-check.1 | 2 | ||||
-rw-r--r-- | trunk/src/glsa-check/glsa.py | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/trunk/src/glsa-check/glsa-check b/trunk/src/glsa-check/glsa-check index efb9e91..fe38331 100755 --- a/trunk/src/glsa-check/glsa-check +++ b/trunk/src/glsa-check/glsa-check @@ -17,7 +17,7 @@ try: except ImportError: from output import * -from getopt import getopt,GetoptError +from getopt import getopt, GetoptError __program__ = "glsa-check" __author__ = "Marius Mauch <genone@gentoo.org>" @@ -230,7 +230,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr): fd1.write(")") if list_cve: fd1.write(" "+(",".join([r[:13] for r in myglsa.references if r[:4] in ["CAN-", "CVE-"]]))) - fd1.write("\n") + fd1.write("\n") return 0 if mode == "list": @@ -328,12 +328,12 @@ if mode == "mail": # color doesn't make any sense for mail nocolor() - if glsaconfig.has_key("PORTAGE_ELOG_MAILURI"): + if "PORTAGE_ELOG_MAILURI" in glsaconfig: myrecipient = glsaconfig["PORTAGE_ELOG_MAILURI"].split()[0] else: myrecipient = "root@localhost" - if glsaconfig.has_key("PORTAGE_ELOG_MAILFROM"): + if "PORTAGE_ELOG_MAILFROM" in glsaconfig: myfrom = glsaconfig["PORTAGE_ELOG_MAILFROM"] else: myfrom = "glsa-check" diff --git a/trunk/src/glsa-check/glsa-check.1 b/trunk/src/glsa-check/glsa-check.1 index 5a7a525..8e0df42 100644 --- a/trunk/src/glsa-check/glsa-check.1 +++ b/trunk/src/glsa-check/glsa-check.1 @@ -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 diff --git a/trunk/src/glsa-check/glsa.py b/trunk/src/glsa-check/glsa.py index 4c8f280..dfd9acd 100644 --- a/trunk/src/glsa-check/glsa.py +++ b/trunk/src/glsa-check/glsa.py @@ -21,7 +21,7 @@ import codecs import re import xml.dom.minidom -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") @@ -32,8 +32,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 @@ -510,7 +510,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") @@ -563,7 +563,7 @@ class Glsa: if i < len(self.bugs)-1: outstream.write(", ") else: - outstream.write("\n") + outstream.write("\n") if self.background: outstream.write("\n"+wrap(self.background, width, caption="Background: ")) outstream.write("\n"+wrap(self.description, width, caption="Description: ")) |