MCPcopy
hub / github.com/benoitc/gunicorn / validate_group

Function validate_group

gunicorn/config.py:512–524  ·  view source on GitHub ↗
(val)

Source from the content-addressed store, hash-verified

510
511
512def validate_group(val):
513 if val is None:
514 return os.getegid()
515
516 if isinstance(val, int):
517 return val
518 elif val.isdigit():
519 return int(val)
520 else:
521 try:
522 return grp.getgrnam(val).gr_gid
523 except KeyError:
524 raise ConfigError("No such group: '%s'" % val)
525
526
527def validate_post_request(val):

Callers

nothing calls this directly

Calls 1

ConfigErrorClass · 0.90

Tested by

no test coverage detected