in DocBuild.py [0:0]
def Clean(self):
retry = 1 # hack to make rmtree more successful
while True:
try:
if(self.OutputDirectory is not None and os.path.isdir(self.OutputDirectory)):
shutil.rmtree(self.OutputDirectory)
except OSError:
if not retry:
# If we're out of retries, bail.
raise Exception(
"Failed to Clean dir {0}".format(self.OutputDirectory))
time.sleep(2)
retry -= 1
continue
break
if(os.path.isfile(self.YmlFilePathOut)):
os.remove(self.YmlFilePathOut)