Skip to content

Commit

Permalink
(v2 api) use imcgenutils.iteritems wrapper in place of bare iteritems…
Browse files Browse the repository at this point in the history
… method call for python3 compatibility
  • Loading branch information
tzakrajs committed Feb 7, 2018
1 parent d85f133 commit 772190b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions imcsdk/apis/v2/server/boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import logging
import imcsdk.imccoreutils as imccoreutils
import imcsdk.imcgenutils as imcgenutils
from imcsdk.mometa.lsboot.LsbootDevPrecision import LsbootDevPrecision

log = logging.getLogger('imc')
Expand Down Expand Up @@ -141,7 +142,7 @@ def _is_boot_order_policy(dn):

def _get_device_type(policy_type, in_device):
if policy_type == "boot-order-policy":
for device_type, device_props in policy_device_dict.iteritems():
for device_type, device_props in imcgenutils.iteritems(policy_device_dict):
if device_props["class_id"] == in_device._class_id and \
device_props["access"] == in_device.access:
return device_type
Expand Down Expand Up @@ -217,7 +218,7 @@ def _add_boot_device(handle, parent_mo_or_dn, boot_device):
(boot_device["device-type"], boot_device["name"]))

device.order = boot_device["order"]
device_props = {key: str(value) for key, value in boot_device.iteritems()
device_props = {key: str(value) for key, value in imcgenutils.iteritems(boot_device)
if key not in ["order", "device-type", "name"]}
device.set_prop_multiple(**device_props)
if hasattr(device, "state"):
Expand Down

0 comments on commit 772190b

Please sign in to comment.