From dfbd7c8d54dc27957438a722bc43e37b1b2057b6 Mon Sep 17 00:00:00 2001 From: Matthew Harmsen Date: Thu, 22 Jun 2017 12:50:21 -0600 Subject: [PATCH] dogtagpki Pagure Issue #2745 - Platform Dependent Python Import (cherry picked from commit 9d63a7a6b1abb42595b6a24296a39a79441ba8df) --- base/common/python/pki/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/base/common/python/pki/client.py b/base/common/python/pki/client.py index 805d0fa..e1a4d3f 100644 --- a/base/common/python/pki/client.py +++ b/base/common/python/pki/client.py @@ -25,7 +25,10 @@ import functools import warnings import requests -from requests.packages.urllib3.exceptions import InsecureRequestWarning +try: + from requests.packages.urllib3.exceptions import InsecureRequestWarning +except ImportError: + from urllib3.exceptions import InsecureRequestWarning def catch_insecure_warning(func): -- 1.8.3.1