summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/ONAPLibrary/HEATKeywords.py
diff options
context:
space:
mode:
Diffstat (limited to 'robotframework-onap/ONAPLibrary/HEATKeywords.py')
-rw-r--r--robotframework-onap/ONAPLibrary/HEATKeywords.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/robotframework-onap/ONAPLibrary/HEATKeywords.py b/robotframework-onap/ONAPLibrary/HEATKeywords.py
index 020d24b..7f47bf9 100644
--- a/robotframework-onap/ONAPLibrary/HEATKeywords.py
+++ b/robotframework-onap/ONAPLibrary/HEATKeywords.py
@@ -21,7 +21,7 @@ import copy
from hashlib import md5
from paramiko import RSAKey
from paramiko.ssh_exception import PasswordRequiredException
-
+from six import string_types
from ONAPLibrary.Utilities import Utilities
@@ -38,7 +38,7 @@ class HEATKeywords(object):
def get_yaml(self, template_file):
"""Template Yaml To Json reads a YAML Heat template file returns a JSON string that can be used included
in an Openstack Add Stack Request"""
- if isinstance(template_file, str) or isinstance(template_file, unicode):
+ if isinstance(template_file, string_types):
fin = open(template_file, 'r')
yamlobj = yaml.load(fin)
return yamlobj
@@ -49,7 +49,7 @@ class HEATKeywords(object):
"""Template Yaml To Json reads a YAML Heat template file returns a JSON string that can be used included
in an Openstack Add Stack Request"""
contents = None
- if isinstance(template_file, str) or isinstance(template_file, unicode):
+ if isinstance(template_file, string_types):
fin = open(template_file, 'r')
yamlobj = yaml.load(fin)
fin.close()
@@ -66,7 +66,7 @@ class HEATKeywords(object):
def env_yaml_to_json(self, template_file):
"""Env Yaml To JSon reads a YAML Heat env file and returns a JSON string that can be used included
in an Openstack Add Stack Request"""
- if isinstance(template_file, str) or isinstance(template_file, unicode):
+ if isinstance(template_file, string_types):
fin = open(template_file, 'r')
yamlobj = yaml.load(fin)
fin.close()