samba-tool: avoid mutable Command class values
commit742fc4d841c1b02cc733760e7841ca13a95f3ebc
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 23 Feb 2024 03:19:02 +0000 (23 16:19 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 29 Feb 2024 01:31:31 +0000 (29 01:31 +0000)
tree0a0f565c7f39aedf7a7802df16d21851833bc336
parent29abab6a460aa61699c4a1811c148552874c1236
samba-tool: avoid mutable Command class values

These values are shared across all instances of the class,
which makes no difference in samba-tool itself, because there
is one instance per process. But in tests we can have many
Command classes at once (due to runcmd()), and if any of them
happened to append to takes_args or takes_options rather than
replacing it, well, the effect would be subtle.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/__init__.py