diff --git a/virtManager/domain.py b/virtManager/domain.py index bb8c5111..f3f21e82 100644 --- a/virtManager/domain.py +++ b/virtManager/domain.py @@ -257,7 +257,8 @@ class vmmDomain(vmmLibvirtObject): @staticmethod def pretty_status_reason(status, reason): - key = lambda x, y: getattr(libvirt, "VIR_DOMAIN_" + x, y) + def key(x, y): + return getattr(libvirt, "VIR_DOMAIN_" + x, y) reasons = { libvirt.VIR_DOMAIN_RUNNING : { key("RUNNING_BOOTED", 1) : _("Booted"), diff --git a/virtinst/pollhelpers.py b/virtinst/pollhelpers.py index dafd0799..d4acc303 100644 --- a/virtinst/pollhelpers.py +++ b/virtinst/pollhelpers.py @@ -153,7 +153,8 @@ def fetch_volumes(backend, pool, origmap, build_func): pool.listAllVolumes, build_func) else: active_list = pool.listVolumes - inactive_list = lambda: [] + def inactive_list(): + return [] lookup_func = pool.storageVolLookupByName return _old_poll_helper(origmap, name, active_list, inactive_list, @@ -184,8 +185,10 @@ def fetch_nodedevs(backend, origmap, build_func): return _new_poll_helper(origmap, name, backend.listAllDevices, build_func) else: - active_list = lambda: backend.listDevices(None, 0) - inactive_list = lambda: [] + def active_list(): + return backend.listDevices(None, 0) + def inactive_list(): + return [] lookup_func = backend.nodeDeviceLookupByName return _old_poll_helper(origmap, name, active_list, inactive_list,