MCPcopy Index your code
hub / github.com/python/cpython / parse_extra_reasons

Function parse_extra_reasons

Tools/ssl/make_ssl_data.py:148–157  ·  view source on GitHub ↗

Parse extra reasons from crypto/err/openssl.ec. Detected lines are matched against "R _R_ ", e.g., "R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010".

(args)

Source from the content-addressed store, hash-verified

146
147
148def parse_extra_reasons(args):
149 """Parse extra reasons from crypto/err/openssl.ec.
150
151 Detected lines are matched against "R <LIBNAME>_R_<ERRNAME> <ERRCODE>",
152 e.g., "R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010".
153 """
154 pat = re.compile(r"^R\s+((\w+)_R_(\w+))\s+(\d+)")
155 for match in _file_search(args.errcodes, pat):
156 reason, libname, errname, num = match.groups()
157 yield reason, libname, errname, int(num)
158
159
160def gen_library_codes(args):

Callers 1

mainFunction · 0.85

Calls 3

_file_searchFunction · 0.85
compileMethod · 0.45
groupsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…