Change in vdsm[master]: utils: Add round() helper

danken at redhat.com danken at redhat.com
Mon Mar 23 14:00:01 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: utils: Add round() helper
......................................................................


Patch Set 2:

(1 comment)

great (as in simple and obvious) idea. thanks.

https://gerrit.ovirt.org/#/c/38210/2/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 1249: def round(n, size):
Line 1250:     """
Line 1251:     Round number n to the next multiple of size
Line 1252:     """
Line 1253:     count = int(n + size - 1) / size
let's use forward-compatible int division //


-- 
To view, visit https://gerrit.ovirt.org/38210
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie46e48d147d1fc222a6e0404df7ab757226f694b
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list