Fix returned landscape value when using python3
This commit is contained in:
parent
7908f78fa6
commit
fea8c84a17
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ def get_device(device_ip):
|
||||||
model_address = model.find('./*[@id="0x12d7f"]').text
|
model_address = model.find('./*[@id="0x12d7f"]').text
|
||||||
|
|
||||||
# derive the landscape handler from the model handler of the device
|
# 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(
|
device = dict(
|
||||||
model_handle=model_handle,
|
model_handle=model_handle,
|
||||||
|
@ -264,7 +264,7 @@ def add_device():
|
||||||
model = root.find('ca:model', namespace)
|
model = root.find('ca:model', namespace)
|
||||||
|
|
||||||
model_handle = model.get('mh')
|
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(
|
device = dict(
|
||||||
model_handle=model_handle,
|
model_handle=model_handle,
|
||||||
|
|
Loading…
Add table
Reference in a new issue