nixops-vbox icon indicating copy to clipboard operation
nixops-vbox copied to clipboard

be robust to malformed `showvminfo` output

Open mxw opened this issue 2 years ago • 1 comments

recent versions of mac os x virtualbos seem to include a sort of section header for recording screen properties, which causes vm creation to fatal because it's not in the expected k=v format. let's just skip over these lines.

fixes #31

mxw avatar Oct 08 '22 03:10 mxw

I wonder though if it would be just slightly more efficient to do something like

parts = line.split("=", 1)
if len(parts) < 2:
  continue
(k,v) = parts

mattoxb avatar Nov 04 '22 15:11 mattoxb