Skip to content

Commit 37443a0

Browse files
committed
validation: make line-directive python 3.5 friendly
`ModuleNotFoundError` was introduced in python 3.6 as a child of `ImportError`. However, some of the CI hosts use python 3.5. Use `ImportError` as the filter type to be compatible with earlier python versions.
1 parent b02924e commit 37443a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/line-directive

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def _make_line_map(target_filename, stream=None):
6363
"""
6464
>>> try:
6565
... from StringIO import StringIO # py2
66-
... except ModuleNotFoundError:
66+
... except ImportError:
6767
... from io import StringIO # py3
6868
>>> _make_line_map('box',
6969
... StringIO('''// ###sourceLocation(file: "foo.bar", line: 3)

0 commit comments

Comments
 (0)