(val)
| 496 | |
| 497 | |
| 498 | def validate_user(val): |
| 499 | if val is None: |
| 500 | return os.geteuid() |
| 501 | if isinstance(val, int): |
| 502 | return val |
| 503 | elif val.isdigit(): |
| 504 | return int(val) |
| 505 | else: |
| 506 | try: |
| 507 | return pwd.getpwnam(val).pw_uid |
| 508 | except KeyError: |
| 509 | raise ConfigError("No such user: '%s'" % val) |
| 510 | |
| 511 | |
| 512 | def validate_group(val): |
nothing calls this directly
no test coverage detected