From 93f4a19778b1a6c1977cc784a5b2706dfd32e1f4 Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Sun, 5 Feb 2012 12:06:18 +0100 Subject: [PATCH] python3: urlencode is in a different module import urlencode from urllib.parse if neeeded for python3. Signed-off-by: Sebastian Spaeth --- offlineimap/ui/Machine.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/offlineimap/ui/Machine.py b/offlineimap/ui/Machine.py index c7f1557..069bb35 100644 --- a/offlineimap/ui/Machine.py +++ b/offlineimap/ui/Machine.py @@ -13,7 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -from urllib import urlencode +try: + from urllib import urlencode +except ImportError: # python3 + from urllib.parse import urlencode import sys import time import logging