MCPcopy Create free account
hub / github.com/conda/constructor / read_ascii_only

Function read_ascii_only

constructor/utils.py:105–111  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

103
104
105def read_ascii_only(path):
106 with open(path) as fi:
107 data = fi.read()
108 for c in data:
109 if ord(c) > 127:
110 sys.exit("Error: unexpected non-ASCII character '%s' in: %s" % (c, path))
111 return data
112
113
114if_pat = re.compile(

Callers 1

get_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected