Adam Litke has posted comments on this change. Change subject: Fixing vcpuCount periodic error. ......................................................................
Patch Set 1: Code-Review+1 (3 comments) Changing -1 to +1 because I don't want to delay this unnecessarily. Please verify it as-is. http://gerrit.ovirt.org/#/c/30486/1/mom/HypervisorInterfaces/vdsmInterface.py File mom/HypervisorInterfaces/vdsmInterface.py: Line 181 Line 182 Line 183 Line 184 Line 185 > You are right, but this is not part of this patch. Also this patch is inten fair point. Line 184 Line 185 Line 186 Line 187 Line 188 > Well mixing the defaults and KeyError does not look much nicer to me. Espec Well it's a matter of style preference. Your concern about accidentally removing defaults could be easily solved by a one line comment. 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) > I actually like "explicit is better than implicit" form the Zen of Python. Not major. 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: Doron Fediuck <dfedi...@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