Skip to content

Commit 198925d

Browse files
committed
Tweak failed parsing logic
1 parent cd175bd commit 198925d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

crawl/bazel.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,14 @@ def _parse_pinned(mvn_install_name, pinned_file_path, verbose=False):
202202
direct_dep_coords_wo_vers = direct_deps_json.get(coord_wo_vers, [])
203203
dep.directs = _get_direct_deps(direct_dep_coords_wo_vers,
204204
coord_wo_vers_to_dep, mvn_install_name,
205-
verbose, False)
206-
if len(dep.directs):
205+
verbose, fail_on_missing=False)
206+
if len(dep.directs) == 0:
207207
# something failed. rerun but this time with more logging
208208
# and mark it to blow up when it hits the failure
209209
dep.directs = _get_direct_deps(direct_dep_coords_wo_vers,
210-
coord_wo_vers_to_dep, mvn_install_name,
211-
True, True)
210+
coord_wo_vers_to_dep,
211+
mvn_install_name, verbose=True,
212+
fail_on_missing=True)
212213

213214
return coord_wo_vers_to_dep.values()
214215

0 commit comments

Comments
 (0)