NixOS/nixops — pull request #132 by rbvermaa (2013-08-23 07:38:34+00:00)
Title: ssh_util: Don't mutate flags passed by reference.

There is a subtle difference in python between doing "l += x" and
"l = l + x" on lists, because the former will change the list instance
in place (brought to you by __iadd__).

See for example:

>>> l = [1,2,3]
>>> def foo(bar): bar = bar + [4,5,6]
...
>>> foo(l); l
[1, 2, 3]
>>> def foo(bar): bar += [4,5,6]
...
>>> foo(l); l
[1, 2, 3, 4, 5, 6]

This usually doesn't do much harm in case of SSH flags, but if you do
ssh-for-each on >= 100 machines, OpenSSH will bail out with:

Too many identity files specified (max 100)

So, we're going to use "flags = flags + x" now instead of +=, which
should fix the problem until the paramiko branch is ready for merge.

Thanks to @rbvermaa for the report.

Signed-off-by: aszlig