From 737b689c98d77043f6f30cf47dcbb0df669538be Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 24 Jan 2016 19:12:30 +0000 Subject: [PATCH] Fix a remnant use of urllib from python2 in gajim-remote --- src/common/helpers.py | 3 +-- src/gajim-remote.py | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/helpers.py b/src/common/helpers.py index 4999addc0..f516bad19 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -35,7 +35,6 @@ import locale import os import subprocess import urllib -from urllib.parse import urlparse import webbrowser import errno import select @@ -144,7 +143,7 @@ def puny_encode_url(url): _url = url if '//' not in _url: _url = '//' + _url - o = urlparse(_url) + o = urllib.parse.urlparse(_url) p_loc = idn_to_ascii(o.netloc) return url.replace(o.netloc, p_loc) diff --git a/src/gajim-remote.py b/src/gajim-remote.py index 2045d1382..8432d54a4 100644 --- a/src/gajim-remote.py +++ b/src/gajim-remote.py @@ -32,6 +32,7 @@ import urllib import signal signal.signal(signal.SIGINT, signal.SIG_DFL) # ^C exits the application + from common import exceptions from common import i18n # This installs _() function from common.i18n import Q_ @@ -543,7 +544,7 @@ class GajimRemote: return jid, args = uri.split('?', 1) try: - jid = urllib.unquote(jid) + jid = urllib.parse.unquote(jid) except UnicodeDecodeError: pass args = args.split(';') @@ -565,7 +566,7 @@ class GajimRemote: # dialog message = options['body'] try: - message = urllib.unquote(message) + message = urllib.parse.unquote(message) except UnicodeDecodeError: pass if len(sys.argv) == 4: