Change in vdsm[master]: misc: Replace assert with AssertionError

nsoffer at redhat.com nsoffer at redhat.com
Wed Apr 13 21:47:50 UTC 2016


Nir Soffer has submitted this change and it was merged.

Change subject: misc: Replace assert with AssertionError
......................................................................


misc: Replace assert with AssertionError

The code was wrongly assumed that asserts are always available. When
running in optimized mode, the check would be skipped, leading to
disastrous results.

The assert was correct in that this is something that should never
happen, unless someone is using the barrier incorrectly, or there is
a bug in the code.

Change-Id: I68f57e393423dc4faf58763a036220849a968e70
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/34363
Reviewed-by: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Reviewed-by: Francesco Romani <fromani at redhat.com>
Reviewed-by: Adam Litke <alitke at redhat.com>
Continuous-Integration: Jenkins CI
---
M tests/miscTests.py
M vdsm/storage/misc.py
2 files changed, 15 insertions(+), 1 deletion(-)

Approvals:
  Piotr Kliczewski: Looks good to me, but someone else must approve
  Adam Litke: Looks good to me, approved
  Nir Soffer: Verified
  Jenkins CI: Passed CI tests
  Francesco Romani: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68f57e393423dc4faf58763a036220849a968e70
Gerrit-PatchSet: 3
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: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the vdsm-patches mailing list