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

Function validate_chdir

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

Source from the content-addressed store, hash-verified

539
540
541def validate_chdir(val):
542 # valid if the value is a string
543 val = validate_string(val)
544
545 # transform relative paths
546 path = os.path.abspath(os.path.normpath(os.path.join(util.getcwd(), val)))
547
548 # test if the path exists
549 if not os.path.exists(path):
550 raise ConfigError("can't chdir to %r" % val)
551
552 return path
553
554
555def validate_statsd_address(val):

Callers

nothing calls this directly

Calls 3

ConfigErrorClass · 0.90
validate_stringFunction · 0.85
existsMethod · 0.80

Tested by

no test coverage detected