From fb9197214f70030117fc68ff8425e6dbdabba250 Mon Sep 17 00:00:00 2001 From: Andrew Parker Date: Wed, 15 Nov 2023 07:59:51 -0700 Subject: [PATCH] Change 'is not' to != To avoid warning messages in Python 3.8+ --- CityworksConnection/connect_to_cityworks.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CityworksConnection/connect_to_cityworks.py b/CityworksConnection/connect_to_cityworks.py index 1b3d74a..70b568c 100644 --- a/CityworksConnection/connect_to_cityworks.py +++ b/CityworksConnection/connect_to_cityworks.py @@ -57,7 +57,7 @@ def get_cw_token(user, pwd, isCWOL): response = get_response(url, params) - if response["Status"] is not 0: + if response["Status"] != 0: return "error: {}: {}".format(response["Status"], response["Message"]) else: @@ -69,7 +69,7 @@ def get_cw_token(user, pwd, isCWOL): response = get_response(url, params) - if response["Status"] is not 0: + if response["Status"] != 0: return "error: {}: {}".format(response["Status"], response["Message"]) else: @@ -367,7 +367,7 @@ def main(event, context): for attachment in attachments: response = copy_attachment(attachmentmgr, attachment, oid, reqid) - if response["Status"] is not 0: + if response["Status"] != 0: try: error = response["ErrorMessages"] except KeyError: @@ -424,7 +424,7 @@ def main(event, context): print('Error accessing comment table {}'.format(relname)) break - elif response["Status"] is not 0: + elif response["Status"] != 0: try: error = response["ErrorMessages"] except KeyError: @@ -455,7 +455,7 @@ def main(event, context): attachments = attachmentmgr.get_list(rel_oid) for attachment in attachments: response = copy_attachment(attachmentmgr, attachment, rel_oid, parent.attributes[ids[1]]) - if response["Status"] is not 0: + if response["Status"] != 0: try: error = response["ErrorMessages"] except KeyError: