Branch: refs/heads/master
  Home:   https://github.com/NixOS/nixops
  Commit: 12ad1813f6859c70a911a6c824de0a4793ab4f1d
      
https://github.com/NixOS/nixops/commit/12ad1813f6859c70a911a6c824de0a4793ab4f1d
  Author: aszlig <[email protected]>
  Date:   2013-08-22 (Thu, 22 Aug 2013)

  Changed paths:
    M nixops/ssh_util.py

  Log Message:
  -----------
  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 <[email protected]>


  Commit: d137b656fed2be90ecbc64ee6b8cb9ab9e18b97e
      
https://github.com/NixOS/nixops/commit/d137b656fed2be90ecbc64ee6b8cb9ab9e18b97e
  Author: Rob Vermaas <[email protected]>
  Date:   2013-08-23 (Fri, 23 Aug 2013)

  Changed paths:
    M nixops/ssh_util.py

  Log Message:
  -----------
  Merge pull request #132 from aszlig/fix-ssh-flags

ssh_util: Don't mutate flags passed by reference.


Compare: https://github.com/NixOS/nixops/compare/4f1013e443b1...d137b656fed2
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to