]> granicus.if.org Git - python/commitdiff
More robust way of choosing a non-existant uid (faster, too).
authorGuido van Rossum <guido@python.org>
Tue, 20 May 1997 19:32:22 +0000 (19:32 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 20 May 1997 19:32:22 +0000 (19:32 +0000)
(Correct version -- the previous checkin was a keyboard slip.)

Lib/test/test_pwd.py

index 2fc8da8a593df7bdf8df2484e3a1d1907a58133a..d9006861b62e7e8046efbc87603e0ed53f59cba0 100644 (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)