def _parse_stack_cfg(content):
 try:
  obj = yaml.safe_load(content)
  if isinstance(obj, list):
   return obj
 except Exception as e:
  pass
 return content.splitlines()

def _parse_stack_cfg ( content ) : try : obj = yaml . safe_load ( content ) if isinstance ( obj , list ) : return obj except Exception as e : pass return content . splitlines ( )
allow top level cfg to be yaml .