More robust way of choosing a non-existant uid (faster, too).

(Correct version -- the previous checkin was a keyboard slip.)
This commit is contained in:
Guido van Rossum 1997-05-20 19:32:22 +00:00
parent 6308d510e9
commit 462d6e6484
1 changed files with 1 additions and 1 deletions

View File

@ -62,7 +62,7 @@ else:
# Choose a non-existant uid.
fakeuid = 4127
while byuids.has_key(fakeuid):
print 'fakeuid =', fakeuid
fakeuid = (fakeuid * 3) % 0x10000
try:
pwd.getpwuid(fakeuid)