Get rid of nobody_uid() and import pwd -- not used here.

This commit is contained in:
Guido van Rossum 1996-09-04 23:42:04 +00:00
parent c14a747d4b
commit f469d5b05d
1 changed files with 0 additions and 12 deletions

View File

@ -10,7 +10,6 @@ __version__ = "0.3"
import os import os
import pwd
import sys import sys
import time import time
import socket import socket
@ -20,17 +19,6 @@ import SocketServer
import BaseHTTPServer import BaseHTTPServer
def nobody_uid():
"""Internal routine to get nobody's uid"""
try:
nobody = pwd.getpwnam('nobody')[2]
except pwd.error:
nobody = 1 + max(map(lambda x: x[2], pwd.getpwall()))
return nobody
nobody = nobody_uid()
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Simple HTTP request handler with GET and HEAD commands. """Simple HTTP request handler with GET and HEAD commands.