mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Merge branch 'bugfix/check_readme_links_no_exception_v4.3' into 'release/v4.3'
check_readme_links: remove throwing of exception before exit (v4.3) See merge request espressif/esp-idf!13345
This commit is contained in:
@@ -22,6 +22,7 @@ import concurrent.futures
|
|||||||
import os
|
import os
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
|
import sys
|
||||||
import urllib.error
|
import urllib.error
|
||||||
import urllib.request
|
import urllib.request
|
||||||
from collections import defaultdict, namedtuple
|
from collections import defaultdict, namedtuple
|
||||||
@@ -148,8 +149,8 @@ def check_readme_links(args):
|
|||||||
print('Found {} errors:'.format(len(errors)))
|
print('Found {} errors:'.format(len(errors)))
|
||||||
for e in errors:
|
for e in errors:
|
||||||
print(e)
|
print(e)
|
||||||
if errors:
|
|
||||||
raise e
|
return 1 if len(errors) > 0 else 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
@@ -158,4 +159,4 @@ if __name__ == '__main__':
|
|||||||
parser.add_argument('--skip-weburl', '-w', action='store_true', help='Skip checking of web URLs, only check links to local files')
|
parser.add_argument('--skip-weburl', '-w', action='store_true', help='Skip checking of web URLs, only check links to local files')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
check_readme_links(args)
|
sys.exit(check_readme_links(args))
|
||||||
|
Reference in New Issue
Block a user