Revision 59072e7e lib/utils.py

b/lib/utils.py
834 834
  except KeyError:
835 835
    return default
836 836
  return result.pw_dir
837

  
838

  
839
def GetUUID():
840
  """Returns a random UUID.
841

  
842
  """
843
  f = open("/proc/sys/kernel/random/uuid", "r")
844
  try:
845
    return f.read(128).rstrip("\n")
846
  finally:
847
    f.close()

Also available in: Unified diff