s/Before before/ Before, rest LGTM. On Tue, Nov 10, 2015 at 4:53 PM 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote:
> When an opcode expands to a list of jobs, we extend the reason trail > of the new jobs with that of the original opcode that expanded to them. > Before before modifying the reason trail, however, we should duplicate > it to avoid side effects on shared copies---like the default empty list. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > lib/mcpu.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/mcpu.py b/lib/mcpu.py > index 72f13bf..ac26054 100644 > --- a/lib/mcpu.py > +++ b/lib/mcpu.py > @@ -225,7 +225,7 @@ def _SetBaseOpParams(src, defcomment, dst): > dst.comment = defcomment > > if hasattr(src, constants.OPCODE_REASON): > - dst.reason = getattr(dst, constants.OPCODE_REASON, []) > + dst.reason = list(getattr(dst, constants.OPCODE_REASON, [])) > dst.reason.extend(getattr(src, constants.OPCODE_REASON, [])) > > > -- > 2.6.0.rc2.230.g3dd15c0 > > -- Lisa Velden Software Engineer [email protected] Google Germany GmbH Dienerstraße 12 80331 München Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg
