summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools/dump_ast_matchers.py
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs/tools/dump_ast_matchers.py')
-rwxr-xr-xclang/docs/tools/dump_ast_matchers.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py
index cae27b20a97..c96c1ca27ac 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
OpenPOWER on IntegriCloud