From 594c5e5617bc9d74464be12599a38b065646af4e Mon Sep 17 00:00:00 2001 From: zhangyangyang Date: Thu, 6 Sep 2018 15:35:19 +0800 Subject: [PATCH] Python 3 compatibility: remove long For Python 3.0, long isn't supported already, it can be replaced with int. Change-Id: Ic8f961057d6f35fa436c8b0d9c18df404df92f2d Story: 2003433 Task: 26203 Signed-off-by: zhangyangyang --- sysinv/sysinv/sysinv/sysinv/openstack/common/jsonutils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sysinv/sysinv/sysinv/sysinv/openstack/common/jsonutils.py b/sysinv/sysinv/sysinv/sysinv/openstack/common/jsonutils.py index f0433ea25a..834438daf0 100644 --- a/sysinv/sysinv/sysinv/sysinv/openstack/common/jsonutils.py +++ b/sysinv/sysinv/sysinv/sysinv/openstack/common/jsonutils.py @@ -52,7 +52,7 @@ _nasty_type_tests = [inspect.ismodule, inspect.isclass, inspect.ismethod, inspect.iscode, inspect.isbuiltin, inspect.isroutine, inspect.isabstract] -_simple_types = (types.NoneType, int, basestring, bool, float, long) +_simple_types = (types.NoneType, six.integer_types, basestring, bool, float) def to_primitive(value, convert_instances=False, convert_datetime=True, @@ -82,7 +82,6 @@ def to_primitive(value, convert_instances=False, convert_datetime=True, # 26164 # 6491 # 283 - # 19 if isinstance(value, _simple_types): return value