Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f469d5b

Browse files
committed
Get rid of nobody_uid() and import pwd -- not used here.
1 parent c14a747 commit f469d5b

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

Lib/SimpleHTTPServer.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
import os
13-
import pwd
1413
import sys
1514
import time
1615
import socket
@@ -20,17 +19,6 @@
2019
import BaseHTTPServer
2120

2221

23-
def nobody_uid():
24-
"""Internal routine to get nobody's uid"""
25-
try:
26-
nobody = pwd.getpwnam('nobody')[2]
27-
except pwd.error:
28-
nobody = 1 + max(map(lambda x: x[2], pwd.getpwall()))
29-
return nobody
30-
31-
nobody = nobody_uid()
32-
33-
3422
class SimpleHTTPRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
3523

3624
"""Simple HTTP request handler with GET and HEAD commands.

0 commit comments

Comments
 (0)