in eng/scripts/run_apiview.py [0:0]
def _single_dir_apiview(mod):
loop = 0
while True:
try:
check_call(
[
"apistubgen",
"--pkg-path",
str(mod.absolute()),
]
)
except CalledProcessError as e:
if loop >= 2: # retry for maximum 3 times because sometimes the apistubgen has transient failure.
logging.error("{} exited with apiview generation error {}".format(mod.stem, e.returncode))
return False
else:
loop += 1
continue
return True