Change in vdsm[master]: netinfo:nicSpeed(): fix nicSpeed condition

danken at redhat.com danken at redhat.com
Fri Oct 31 21:25:44 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: netinfo:nicSpeed(): fix nicSpeed condition
......................................................................


netinfo:nicSpeed(): fix nicSpeed condition

In `if s not in (2 ** 16 - 1, 2 ** 32 - 1) or s > 0` first part doesn't
make sense with OR. Changed to AND.

I changed conditions to make the function more readable and created unit
test, to be sure that function returns correct values.

Change-Id: I34cfca16909f9695441e26d3ddd508e7a4210c12
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1157224
Signed-off-by: Petr Horáček <phoracek at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/34694
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M lib/vdsm/netinfo.py
M tests/netinfoTests.py
2 files changed, 30 insertions(+), 13 deletions(-)

Approvals:
  Petr Horáček: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/34694
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I34cfca16909f9695441e26d3ddd508e7a4210c12
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list