Dolda2000 GitWeb
/
wrw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Allow setting attributes to None as a noop, for convenience.
[wrw.git]
/
wrw
/
sp
/
cons.py
diff --git
a/wrw/sp/cons.py
b/wrw/sp/cons.py
index
ce258c6
..
4052dce
100644
(file)
--- a/
wrw/sp/cons.py
+++ b/
wrw/sp/cons.py
@@
-60,7
+60,8
@@
class context(object):
node.children.append(self.nodefrom(child))
def addattr(self, node, k, v):
- node.attrs[unicode(k)] = unicode(v)
+ if v is not None:
+ node.attrs[unicode(k)] = unicode(v)
class constructor(object):
def __init__(self, ns, elcls=element, ctx=None):