diff options
author | mathieui <mathieui@mathieui.net> | 2013-02-28 22:44:07 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-02-28 22:44:07 +0100 |
commit | 5a0cec9717d94cc1c726a150596467ed894ed51a (patch) | |
tree | 9dbe6eec79ee02a7edc065edeab035b557cd23c9 | |
parent | abfd50aacd3e6cbe650461006843e8a394b78318 (diff) | |
download | poezio-5a0cec9717d94cc1c726a150596467ed894ed51a.tar.gz poezio-5a0cec9717d94cc1c726a150596467ed894ed51a.tar.bz2 poezio-5a0cec9717d94cc1c726a150596467ed894ed51a.tar.xz poezio-5a0cec9717d94cc1c726a150596467ed894ed51a.zip |
Fix a traceback due to a sleekxmpp API change
- remove the help message for people still using the old custom
sleekxmpp repo
-rw-r--r-- | src/connection.py | 17 | ||||
-rw-r--r-- | src/xhtml.py | 2 |
2 files changed, 5 insertions, 14 deletions
diff --git a/src/connection.py b/src/connection.py index b33e0aab..6217023b 100644 --- a/src/connection.py +++ b/src/connection.py @@ -61,24 +61,13 @@ class Connection(sleekxmpp.ClientXMPP): self.whitespace_keepalive_interval = 300 # Hack to check the sleekxmpp version # TODO: Remove that when a sufficient time has passed since the move - try: - self.register_plugin('xep_0071') - wrong_version = True - except: - wrong_version = False - finally: - if wrong_version: - print("You are using the wrong sleekxmpp version. Please run " - "update.sh again or install the corresponding " - "sleekxmpp package.") - sys.exit() - + self.register_plugin('xep_0004') self.register_plugin('xep_0012') self.register_plugin('xep_0030') - self.register_plugin('xep_0004') self.register_plugin('xep_0045') - self.register_plugin('xep_0060') self.register_plugin('xep_0048') + self.register_plugin('xep_0060') + self.register_plugin('xep_0071') self.register_plugin('xep_0085') self.register_plugin('xep_0191') if config.get('send_poezio_info', 'true') == 'true': diff --git a/src/xhtml.py b/src/xhtml.py index 1c9c20e7..ce53029e 100644 --- a/src/xhtml.py +++ b/src/xhtml.py @@ -193,6 +193,8 @@ def get_body_from_message_stanza(message): if config.get('enable_xhtml_im', 'true') == 'true': xhtml_body = message['html']['body'] if xhtml_body: + if isinstance(xhtml_body, str): + xhtml_body = ET.fromstring(xhtml_body) content = xhtml_to_poezio_colors(xhtml_body) content = content if content else message['body'] return content or " " |