grid/utils: Improve parsing of instance's python

See merge request nexedi/slapos.core!520
2 jobs for edge in 0 seconds
Status Job ID Name Coverage
  External
failed SlapOS-Master.UnitTest-Rafael.Edge

02:38:26

failed SlapOS-Master.UnitTest-Rafael.Edge

06:34:12