summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Martin <consume.noise@gmail.com>2013-01-11 18:10:08 +0100
committerDaniel Martin <consume.noise@gmail.com>2013-02-14 20:40:34 +0100
commit28ae6975c0c9d9b2d186bdd30d96ae35191428b2 (patch)
tree0d423887f6dfbf059d4c2213568984fcde640de7
parentc0d65da722ec194650f711d7a1948b777f0dc34c (diff)
Simplify boolean attribute retrieval
-rw-r--r--xcbgen/xtypes.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py
index f6d4634..c97273f 100644
--- a/xcbgen/xtypes.py
+++ b/xcbgen/xtypes.py
@@ -593,8 +593,7 @@ class Event(ComplexType):
ComplexType.__init__(self, name, elt)
self.opcodes = {}
- tmp = elt.get('no-sequence-number')
- self.has_seq = (tmp == None or tmp.lower() == 'false' or tmp == '0')
+ self.has_seq = not bool(elt.get('no-sequence-number'))
self.doc = None
for item in list(elt):