Blob Blame History Raw
From 9d63a7a6b1abb42595b6a24296a39a79441ba8df Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen@redhat.com>
Date: Thu, 22 Jun 2017 12:50:21 -0600
Subject: [PATCH] dogtagpki Pagure Issue #2745 - Platform Dependent Python
 Import

---
 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):
-- 
2.9.4