diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2017-05-03 16:07:11 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2017-05-03 16:07:11 +0100 |
commit | 7228c9cf6d78d855afab90c8ce95850dd2712c14 (patch) | |
tree | a8ed13d648f0160e99752b4cf20ab242e723696d /poezio/xhtml.py | |
parent | 7d00b94f16c94d2f27c097ed675fb02487b7c0aa (diff) | |
download | poezio-7228c9cf6d78d855afab90c8ce95850dd2712c14.tar.gz poezio-7228c9cf6d78d855afab90c8ce95850dd2712c14.tar.bz2 poezio-7228c9cf6d78d855afab90c8ce95850dd2712c14.tar.xz poezio-7228c9cf6d78d855afab90c8ce95850dd2712c14.zip |
Avoid some deprecation warnings when casting raw XML into bool. (thanks pypy3)
Diffstat (limited to 'poezio/xhtml.py')
-rw-r--r-- | poezio/xhtml.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/xhtml.py b/poezio/xhtml.py index 59c2ac7c..3d988806 100644 --- a/poezio/xhtml.py +++ b/poezio/xhtml.py @@ -198,10 +198,10 @@ def get_body_from_message_stanza(message, use_xhtml=False, if not use_xhtml: return message['body'] xhtml = message.xml.find('{http://jabber.org/protocol/xhtml-im}html') - if not xhtml: + if xhtml is not None: return message['body'] xhtml_body = xhtml.find('{http://www.w3.org/1999/xhtml}body') - if not xhtml_body: + if xhtml_body is not None: return message['body'] content = xhtml_to_poezio_colors(xhtml_body, tmp_dir=tmp_dir, extract_images=extract_images) |