mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Use random instead of whrandom.
This commit is contained in:
parent
33d7f1a76c
commit
b26a1b4e2b
5 changed files with 18 additions and 18 deletions
|
|
@ -109,7 +109,7 @@ _prefix = None
|
|||
def choose_boundary():
|
||||
global _prefix
|
||||
import time
|
||||
import whrandom
|
||||
import random
|
||||
if _prefix == None:
|
||||
import socket
|
||||
import os
|
||||
|
|
@ -124,7 +124,7 @@ def choose_boundary():
|
|||
pid = '1'
|
||||
_prefix = hostid + '.' + uid + '.' + pid
|
||||
timestamp = '%.3f' % time.time()
|
||||
seed = `whrandom.randint(0, 32767)`
|
||||
seed = `random.randint(0, 32767)`
|
||||
return _prefix + '.' + timestamp + '.' + seed
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue