From 32e96f580718574cfed7cf929186707b26c5f948 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Fri, 30 Nov 2012 22:16:08 -0600 Subject: [PATCH] Fixed more Python 3 import errors --HG-- branch : py3k --- src/milla/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/milla/__init__.py b/src/milla/__init__.py index 4d03d24..f8334b3 100644 --- a/src/milla/__init__.py +++ b/src/milla/__init__.py @@ -19,13 +19,13 @@ from milla.app import * from milla.auth.decorators import * from webob.exc import * import webob -import urllib try: import urllib.parse -except ImportError: +except ImportError: #pragma: no cover + import urllib import urlparse urllib.parse = urlparse - + urllib.parse.urlencode = urllib.urlencode #@UndefinedVariable def allow(*methods): '''Specify the allowed HTTP verbs for a controller callable @@ -82,7 +82,7 @@ class Request(webob.Request): url = self._merge_url(self.script_name, path) if keywords: - url += '?' + urllib.urlencode(keywords) + url += '?' + urllib.parse.urlencode(keywords) return url @@ -102,7 +102,7 @@ class Request(webob.Request): url = self._merge_url(self.application_url, path) if keywords: - url += '?' + urllib.urlencode(keywords) + url += '?' + urllib.parse.urlencode(keywords) return url