From c97cac19f0c226957317fa37e02c5f41a694e083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Fri, 8 Jun 2018 10:54:57 +0100 Subject: [PATCH] Import urllib stuff from _compat --- gluon/contrib/DowCommerce.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gluon/contrib/DowCommerce.py b/gluon/contrib/DowCommerce.py index 31fd7927..f900c6b9 100644 --- a/gluon/contrib/DowCommerce.py +++ b/gluon/contrib/DowCommerce.py @@ -14,7 +14,7 @@ from __future__ import print_function __all__ = ['DowCommerce'] from operator import itemgetter -import urllib +from gluon._compat import urlopen, urlencode, FancyURLopene class DowCommerce: @@ -49,12 +49,12 @@ class DowCommerce: self.setParameter('password', password) def process(self): - encoded_args = urllib.urlencode(self.parameters) + encoded_args = urlencode(self.parameters) if self.proxy is None: - results = str(urllib.urlopen( + results = str(urlopen( self.url, encoded_args).read()).split(self.delimiter) else: - opener = urllib.FancyURLopener(self.proxy) + opener = FancyURLopener(self.proxy) opened = opener.open(self.url, encoded_args) try: results = str(opened.read()).split(self.delimiter)