def uuid1(node=None, clock_seq=None):
"""
Generate a UUID from a host ID, sequence number, and the cuurent time.
The 'node' and 'clock_seq' arguments are ignored.
Attempt to use 'uuidgen'
Attempt to use 'uuid' (for debian)
"""
(result, output) = _commands.getstatusoutput('uuidgen -t')
if (result == 0): return output
return _commands.getoutput('uuid -v 1 -m')
评论列表
文章目录