Fixed more Python 3 import errors

--HG--
branch : py3k
master
Dustin C. Hatch 2012-11-30 22:16:08 -06:00
parent f8e89d46c6
commit 32e96f5807
1 changed files with 5 additions and 5 deletions

View File

@ -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