The Python command ' '.join([str(v) for v in cmd if v]) will exclude command args that are 0, which breaks, for example, capturing traffic on interface 0 of a VM.
Instead, use test if v is not None. This will allow empty strings to get through, but that shouldn't cause a problem.
The Python command
' '.join([str(v) for v in cmd if v])
will exclude command args that are0
, which breaks, for example, capturing traffic on interface 0 of a VM.Instead, use test
if v is not None
. This will allow empty strings to get through, but that shouldn't cause a problem.