From c058a1e1257493d4873fe86cf77c635cd7193e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Mon, 10 Apr 2017 23:48:52 +0200 Subject: [PATCH 1/2] zeroconf: string.letters has been removed with Python 3 use ascii_letters which should be sufficient --- src/common/zeroconf/client_zeroconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/zeroconf/client_zeroconf.py b/src/common/zeroconf/client_zeroconf.py index e61ee462b..b7c95aea4 100644 --- a/src/common/zeroconf/client_zeroconf.py +++ b/src/common/zeroconf/client_zeroconf.py @@ -801,7 +801,7 @@ class ClientZeroconf: """ Generate a random id """ - return ''.join(Random().sample(string.letters + string.digits, 6)) + return ''.join(Random().sample(string.ascii_letters + string.digits, 6)) def RegisterDisconnectHandler(self, handler): """ From 4725858ab17548ae18e867c3572a013c5d3626ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Apitzsch?= Date: Mon, 10 Apr 2017 23:53:54 +0200 Subject: [PATCH 2/2] zeroconf: 'to' is of type JID and no string use a class method to remove the resource from JID --- src/common/zeroconf/client_zeroconf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/zeroconf/client_zeroconf.py b/src/common/zeroconf/client_zeroconf.py index b7c95aea4..f24d041a8 100644 --- a/src/common/zeroconf/client_zeroconf.py +++ b/src/common/zeroconf/client_zeroconf.py @@ -756,7 +756,7 @@ class ClientZeroconf: if to is None: # Can’t send undirected stanza over Zeroconf. return -1 - to = gajim.get_jid_without_resource(to) + to = to.getStripped() stanza.setFrom(self.roster.zeroconf.name) try: