Dan Kenigsberg has posted comments on this change.
Change subject: misc: use approriate raise form in RollbackContext
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(1 inline comment)
....................................................
File vdsm/storage/misc.py
Line 737: traceback = sys.exc_info()[2]
Line 738:
Line 739: # re-raise the earliest exception
Line 740: if firstException is not None:
Line 741: raise (firstException, None, traceback)
I'm actually surprised that your syntax does not crack with TypeError, since
you try to raise a tuple. But fact is that the traceback is not preserved by
your code (at least on my 2.7.3).
import sys
def f():
raise ValueError("hello")
try:
f()
except:
raise (ValueError, "goodbye", sys.exc_info()[2])
# raise ValueError, "goodbye", sys.exc_info()[2]
Line 742:
Line 743: def defer(self, func, *args, **kwargs):
Line 744: self._finally.append((func, args, kwargs))
Line 745:
--
To view, visit http://gerrit.ovirt.org/9360
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I390771ad2465069400bd777c4463019609ae17d8
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches