[Yum-devel] [PATCH] Make transaction wrapper vsflag push/pop actually work
James Antill
james at fedoraproject.org
Fri Feb 11 15:36:25 UTC 2011
On Fri, 2011-02-11 at 17:14 +0200, Panu Matilainen wrote:
> Well, I just fail to see how the current behavior is useful:
>
> >>> from rpmUtils.transaction import TransactionWrapper
> >>> ts = TransactionWrapper()
> >>> ts.pushVSFlags(123)
> >>> ts.popVSFlags()
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/site-packages/rpmUtils/transaction.py", line
> 80, in popVSFlags
> self.ts.setVSFlags(self.tsflags[-1])
> IndexError: list index out of range
> >>>
It might be worth initializing tsflags to [0] instead of [], or even
[ts.getVSFlags()].
More information about the Yum-devel
mailing list