diff options
Diffstat (limited to 'clang/docs')
-rwxr-xr-x | clang/docs/tools/dump_ast_matchers.py | 7 | ||||
-rwxr-xr-x | clang/docs/tools/dump_format_style.py | 1 |
2 files changed, 5 insertions, 3 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index cae27b20a970..c96c1ca27acb 100755 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -5,7 +5,10 @@ import collections import re -import urllib2 +try: + from urllib.request import urlopen +except ImportError: + from urllib2 import urlopen MATCHERS_FILE = '../../include/clang/ASTMatchers/ASTMatchers.h' @@ -42,7 +45,7 @@ def esc(text): if url not in doxygen_probes: try: print('Probing %s...' % url) - urllib2.urlopen(url) + urlopen(url) doxygen_probes[url] = True except: doxygen_probes[url] = False diff --git a/clang/docs/tools/dump_format_style.py b/clang/docs/tools/dump_format_style.py index f2682edc7773..5feb793a4d70 100755 --- a/clang/docs/tools/dump_format_style.py +++ b/clang/docs/tools/dump_format_style.py @@ -6,7 +6,6 @@ import collections import os import re -import urllib2 CLANG_DIR = os.path.join(os.path.dirname(__file__), '../..') FORMAT_STYLE_FILE = os.path.join(CLANG_DIR, 'include/clang/Format/Format.h') |