Skip to content

Commit

Permalink
I hate XML
Browse files Browse the repository at this point in the history
  • Loading branch information
smn committed Apr 16, 2014
1 parent cf81ae5 commit bf2df7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion vumi/transports/wechat/message_types.py
Expand Up @@ -10,7 +10,7 @@

def get_child_value(node, name):
[child] = node.findall(name)
return child.text.strip()
return (child.text.strip() if child.text is not None else '')


def append(node, tag, value):
Expand Down
4 changes: 1 addition & 3 deletions vumi/transports/wechat/tests/test_wechat.py
Expand Up @@ -149,9 +149,7 @@ def test_inbound_event_subscribe_message(self):
<Event>
<![CDATA[subscribe]]>
</Event>
<EventKey>
<![CDATA[]]>
</EventKey>
<EventKey><![CDATA[]]></EventKey>
</xml>
""")
self.assertEqual(resp.code, http.OK)
Expand Down

0 comments on commit bf2df7d

Please sign in to comment.