Skip to content

Commit 0e555e5

Browse files
author
thk123
committed
Add check for missing unidiff dependency
1 parent 0ae5255 commit 0e555e5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/diff_to_added_lines.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
def diff_to_added_lines(diff_file, repository_root, out_stream):
66

7-
import unidiff
7+
try:
8+
import unidiff
9+
except ImportError:
10+
print("diff_to_added_lines.py requires unidiff, use `pip install --user unidiff` to install")
11+
sys.exit(1)
12+
813
import os.path
914
import json
1015

0 commit comments

Comments
 (0)