From 0ac44b53741a63f5c70c29062b5819df9692f812 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 01 2017 07:39:23 +0000 Subject: fix relative import --- diff --git a/koji/compatrequests.py b/koji/compatrequests.py index 7605efa..8d7d6a3 100644 --- a/koji/compatrequests.py +++ b/koji/compatrequests.py @@ -12,10 +12,10 @@ import six.moves.http_client import urlparse import urllib import sys -import ssl.SSLCommon +from .ssl import SSLCommon import six try: - from ssl import ssl as pyssl + from .ssl import ssl as pyssl except ImportError: # pragma: no cover pass @@ -61,9 +61,9 @@ class Session(object): certs['peer_ca_cert'] = verify if cert: certs['key_and_cert'] = cert - ctx = ssl.SSLCommon.CreateSSLContext(certs) + ctx = SSLCommon.CreateSSLContext(certs) cnxOpts = {'ssl_context' : ctx} - cnxClass = ssl.SSLCommon.PlgHTTPSConnection + cnxClass = SSLCommon.PlgHTTPSConnection default_port = 443 elif scheme == 'https': cnxOpts = {} diff --git a/tests/test_cli/test_edit_tag.py b/tests/test_cli/test_edit_tag.py index f59bb48..e11c485 100644 --- a/tests/test_cli/test_edit_tag.py +++ b/tests/test_cli/test_edit_tag.py @@ -11,7 +11,7 @@ import mock from mock import call -import loadcli +from . import loadcli import six cli = loadcli.cli