MCPcopy Index your code
hub / github.com/RustPython/RustPython / nobody_uid

Function nobody_uid

Lib/http/server.py:1022–1035  ·  view source on GitHub ↗

Internal routine to get nobody's uid

()

Source from the content-addressed store, hash-verified

1020nobody = None
1021
1022def nobody_uid():
1023 """Internal routine to get nobody's uid"""
1024 global nobody
1025 if nobody:
1026 return nobody
1027 try:
1028 import pwd
1029 except ImportError:
1030 return -1
1031 try:
1032 nobody = pwd.getpwnam('nobody')[2]
1033 except KeyError:
1034 nobody = 1 + max(x[2] for x in pwd.getpwall())
1035 return nobody
1036
1037
1038def executable(path):

Callers 1

run_cgiMethod · 0.85

Calls 1

maxFunction · 0.85

Tested by

no test coverage detected