Skip to content

Commit 53caaf2

Browse files
Vladimir Kotalahornace
authored andcommitted
check None config
1 parent 6c62ede commit 53caaf2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/src/main/python/opengrok_tools/reindex_project.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ def get_config_file(logger, uri, headers=None, timeout=None):
6565
Get fresh configuration from the webapp and store it in temporary file.
6666
"""
6767
config = get_configuration(logger, uri, headers=headers, timeout=timeout)
68+
if config is None:
69+
return None
6870

6971
with tempfile.NamedTemporaryFile(delete=False) as tmpf:
7072
tmpf.write(config.encode())
@@ -109,6 +111,8 @@ def main():
109111
# Get files needed for per-project reindex.
110112
headers = get_headers(args.header)
111113
conf_file = get_config_file(logger, args.uri, headers=headers)
114+
if conf_file is None:
115+
fatal("could not get config file to run the indexer")
112116
logprop_file = None
113117
if args.template and args.pattern:
114118
logprop_file = get_logprop_file(logger, args.template, args.pattern,

0 commit comments

Comments
 (0)