Skip to content

Commit e13151c

Browse files
author
Vladimir Kotal
committed
handle get_first_line() failure gracefully
1 parent 1f7c801 commit e13151c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/sync/opengrok.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,7 @@ def get_repo_type(logger, path, messages_file):
9696

9797
line = get_first_line(logger, [messages_file, '-n', 'repository', '-t',
9898
path, 'get-repo-type'])
99+
if not line:
100+
return None
99101
idx = line.rfind(":")
100102
return line[idx + 1:]

0 commit comments

Comments
 (0)