From: Fredrik Tolf Date: Thu, 26 Dec 2013 07:43:08 +0000 (+0100) Subject: Allow noop-adding of None objects. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=b339a6776813c92c27e40ec5477d7fe5c3bd38bc;p=wrw.git Allow noop-adding of None objects. --- diff --git a/wrw/sp/cons.py b/wrw/sp/cons.py index 1e3d678..ff6a1b1 100644 --- a/wrw/sp/cons.py +++ b/wrw/sp/cons.py @@ -60,6 +60,8 @@ class context(object): raise Exception("No node conversion known for %s objects" % str(type(ob))) def addchild(self, node, child): + if child is None: + return node.children.append(self.nodefrom(child)) def addattr(self, node, k, v):