summaryrefslogtreecommitdiffstats
path: root/robotframework-onap/ONAPLibrary/HEATKeywords.py
diff options
context:
space:
mode:
authorDR695H <dr695h@att.com>2019-08-28 10:52:51 -0400
committerDR695H <dr695h@att.com>2019-08-28 11:21:56 -0400
commitf2b75da8dd38077c60cc2c852f73092980c1f906 (patch)
treef58fc4de4f54eec45e10717fabcb62d7cbe64182 /robotframework-onap/ONAPLibrary/HEATKeywords.py
parent566c583bbfe0b5a4e46af7ac53765a1340d11fc0 (diff)
fix linter errors and copyright
Change-Id: Idf7384307623c70a9f7714a5d276f404873c5974 Issue-ID: TEST-198 Signed-off-by: DR695H <dr695h@att.com>
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()