Martin Sivák has posted comments on this change. Change subject: Fixing vcpuCount periodic error. ......................................................................
Patch Set 1: (1 comment) http://gerrit.ovirt.org/#/c/30486/1/mom/HypervisorInterfaces/vdsmInterface.py File mom/HypervisorInterfaces/vdsmInterface.py: Line 180: vcpuPeriod = response['statsList'][0].get('vcpuPeriod', 0) Line 181: ret['vcpu_period'] = vcpuPeriod Line 182: Line 183: #Get num of vCPUs Line 184: vcpuCount = response['statsList'][0].get('vcpuCount', None) > The second parameter of get() defaults to None so just write this: I actually like "explicit is better than implicit" form the Zen of Python. Do you insist or is it just a minor fault? Line 185: if vcpuCount == None: Line 186: return None Line 187: else: Line 188: ret['vcpu_count'] = vcpuCount -- To view, visit http://gerrit.ovirt.org/30486 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ie913a68b95f0384dbd573275cd9e70cb6c740ee6 Gerrit-PatchSet: 1 Gerrit-Project: mom Gerrit-Branch: mom-0.4.1 Gerrit-Owner: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Jiří Moskovčák <jmosk...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches