Dan Kenigsberg has uploaded a new change for review. Change subject: spbackends: simplify over-general evaluation ......................................................................
spbackends: simplify over-general evaluation The removed code is too clever for the use case of only two values. Change-Id: I775c4a6003a03c6b65bee3abc8559a88e3eaec01 Signed-off-by: Dan Kenigsberg <[email protected]> --- M vdsm/storage/spbackends.py 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/53/41253/1 diff --git a/vdsm/storage/spbackends.py b/vdsm/storage/spbackends.py index 953e01e..f6ce02b 100644 --- a/vdsm/storage/spbackends.py +++ b/vdsm/storage/spbackends.py @@ -229,8 +229,11 @@ def setSpmStatus(self, lVer=None, spmId=None): self.invalidateMetadata() - metaParams = dict(filter(lambda kv: kv[1] is not None, - ((PMDK_LVER, lVer), (PMDK_SPM_ID, spmId)))) + metaParams = {} + if lVer is not None: + metaParams[PMDK_LVER] = lVer + if spmId is not None: + metaParams[PMDK_SPM_ID] = spmId self._metadata.update(metaParams) @unsecured -- To view, visit https://gerrit.ovirt.org/41253 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I775c4a6003a03c6b65bee3abc8559a88e3eaec01 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Dan Kenigsberg <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
