From fea8c84a17764a705654ee70525381fa8732d43c Mon Sep 17 00:00:00 2001 From: Renato Orgito Date: Thu, 29 Mar 2018 08:52:50 -0300 Subject: [PATCH] Fix returned landscape value when using python3 --- lib/ansible/modules/monitoring/spectrum_device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/monitoring/spectrum_device.py b/lib/ansible/modules/monitoring/spectrum_device.py index 4cf94bdb24..9900d25d42 100644 --- a/lib/ansible/modules/monitoring/spectrum_device.py +++ b/lib/ansible/modules/monitoring/spectrum_device.py @@ -224,7 +224,7 @@ def get_device(device_ip): model_address = model.find('./*[@id="0x12d7f"]').text # derive the landscape handler from the model handler of the device - model_landscape = "0x%x" % int(int(model_handle, 16) / 0x100000 * 0x100000) + model_landscape = "0x%x" % int(int(model_handle, 16) // 0x100000 * 0x100000) device = dict( model_handle=model_handle, @@ -264,7 +264,7 @@ def add_device(): model = root.find('ca:model', namespace) model_handle = model.get('mh') - model_landscape = "0x%x" % int(int(model_handle, 16) / 0x100000 * 0x100000) + model_landscape = "0x%x" % int(int(model_handle, 16) // 0x100000 * 0x100000) device = dict( model_handle=model_handle,