sandia-minimega / minimega

minimega
GNU General Public License v3.0
148 stars 66 forks source link

[pyapigen] Allow zeros in minimega command args #1491

Closed activeshadow closed 1 year ago

activeshadow commented 1 year ago

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.