summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts/library
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-08-08 15:31:08 -0400
committerAndrew Butcher <abutcher@redhat.com>2016-08-08 15:31:08 -0400
commit9b0d793eadddf290388239b167cdf83142a36c78 (patch)
treecce443a55500a9a30d74c0352fd46f68276c1bd6 /roles/openshift_facts/library
parent4ef9403aef6df97f01b44e483c5818726b2b75d9 (diff)
downloadopenshift-9b0d793eadddf290388239b167cdf83142a36c78.tar.gz
openshift-9b0d793eadddf290388239b167cdf83142a36c78.tar.bz2
openshift-9b0d793eadddf290388239b167cdf83142a36c78.tar.xz
openshift-9b0d793eadddf290388239b167cdf83142a36c78.zip
Try/except urlparse calls.
Diffstat (limited to 'roles/openshift_facts/library')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 659f4eba6..afa2626f9 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -944,7 +944,11 @@ def format_url(use_ssl, hostname, port, path=''):
netloc = hostname
if (use_ssl and port != '443') or (not use_ssl and port != '80'):
netloc += ":%s" % port
- return urlparse.urlunparse((scheme, netloc, path, '', '', ''))
+ try:
+ url = urlparse.urlunparse((scheme, netloc, path, '', '', ''))
+ except AttributeError:
+ url = urlunparse((scheme, netloc, path, '', '', ''))
+ return url
def get_current_config(facts):
""" Get current openshift config