aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/glsa-check/glsa.py')
-rw-r--r--trunk/src/glsa-check/glsa.py10
1 files changed, 5 insertions, 5 deletions
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: "))