mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Another batch...
This commit is contained in:
parent
c458e945a4
commit
28d4ba24c9
8 changed files with 54 additions and 28 deletions
|
@ -10,7 +10,6 @@ __version__ = "0.3"
|
|||
|
||||
|
||||
import os
|
||||
import pwd
|
||||
import sys
|
||||
import time
|
||||
import socket
|
||||
|
@ -20,17 +19,6 @@ import SocketServer
|
|||
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):
|
||||
|
||||
"""Simple HTTP request handler with GET and HEAD commands.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue