def _LockList(names):
  if names == locking.ALL_SET:
    return names
  elif isinstance(names, basestring):
    return [names]
  else:
    return list(names)
If 'names' is a string, make it a single-element list.
dataset/ETHPy150Open ganeti/ganeti/lib/mcpu.py/_LockList