summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/tosca-parser')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/utils/urlutils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/utils/urlutils.py b/tosca2heat/tosca-parser/toscaparser/utils/urlutils.py
index 8022158..34b6032 100644
--- a/tosca2heat/tosca-parser/toscaparser/utils/urlutils.py
+++ b/tosca2heat/tosca-parser/toscaparser/utils/urlutils.py
@@ -18,10 +18,10 @@ from toscaparser.utils.gettextutils import _
try:
# Python 3.x
- import urllib.request as urllib
+ import urllib.request as urllib2
except ImportError:
# Python 2.x
- import urllib
+ import urllib2
class UrlUtils(object):
@@ -58,4 +58,4 @@ class UrlUtils(object):
Returns true if the get call returns a 200 response code.
Otherwise, returns false.
"""
- return urllib.urlopen(url).getcode() == 200
+ return urllib2.urlopen(url).getcode() == 200