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

Function validate_string

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

Source from the content-addressed store, hash-verified

409
410
411def validate_string(val):
412 if val is None:
413 return None
414 if not isinstance(val, str):
415 raise TypeError("Not a string: %s" % val)
416 return val.strip()
417
418
419def validate_file_exists(val):

Callers 5

validate_list_stringFunction · 0.85
validate_string_to_listFunction · 0.85
validate_classFunction · 0.85
validate_chdirFunction · 0.85
validate_statsd_addressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected