From f2b75da8dd38077c60cc2c852f73092980c1f906 Mon Sep 17 00:00:00 2001 From: DR695H Date: Wed, 28 Aug 2019 10:52:51 -0400 Subject: fix linter errors and copyright Change-Id: Idf7384307623c70a9f7714a5d276f404873c5974 Issue-ID: TEST-198 Signed-off-by: DR695H --- robotframework-onap/ONAPLibrary/JSONPathKeywords.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'robotframework-onap/ONAPLibrary/JSONPathKeywords.py') diff --git a/robotframework-onap/ONAPLibrary/JSONPathKeywords.py b/robotframework-onap/ONAPLibrary/JSONPathKeywords.py index 22e5e04..d5ed23a 100644 --- a/robotframework-onap/ONAPLibrary/JSONPathKeywords.py +++ b/robotframework-onap/ONAPLibrary/JSONPathKeywords.py @@ -11,8 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -import json +import json +from six import string_types from robot.api.deco import keyword from jsonpath_rw import parse @@ -30,7 +31,7 @@ class JSONPathKeywords(object): which is converted into string if needed and then compares them, returning the matches.""" jsonpath_expr = parse(expression) - if isinstance(target, str) or isinstance(target, unicode): + if isinstance(target, string_types): search_json = json.dumps(target) else: search_json = target -- cgit 1.2.3-korg