From e3042628792eefce6168b93220308b138647c8f0 Mon Sep 17 00:00:00 2001 From: Kai Schwarz Date: Mon, 9 Jul 2018 17:42:42 +0200 Subject: [PATCH] fix six import paths --- hexonet/apiconnector/connection.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hexonet/apiconnector/connection.py b/hexonet/apiconnector/connection.py index 59c39d6..053e097 100755 --- a/hexonet/apiconnector/connection.py +++ b/hexonet/apiconnector/connection.py @@ -1,5 +1,5 @@ -from six.moves.urllib import request -from six.moves import urlparse +from six.moves.urllib.request import urlopen +from six.moves.urllib.parse import urlparse, urlencode import hexonet.apiconnector.util from hexonet.apiconnector.response import Response @@ -33,8 +33,8 @@ def call_raw_http(self, command, config=None): post['s_login'] = self._config['login'] + "!" + self._config['role'] post['s_command'] = hexonet.apiconnector.util.command_encode(command) - post = urlparse.urlencode(post) - response = request.urlopen(self._config['url'], post.encode('UTF-8')) + post = urlencode(post) + response = urlopen(self._config['url'], post.encode('UTF-8')) content = response.read() return content