Skip to content

Commit 0c2dfe3

Browse files
authored
Fixed assert curr.location is not None (#3105)
Fix #3096
1 parent 9977732 commit 0c2dfe3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/databricks/labs/ucx/hive_metastore/locations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ def _external_locations(self) -> Iterable[ExternalLocation]:
188188
curr.parent and curr.parent.is_valid() and num_children == 0 and not curr.is_jdbc()
189189
): # one table having the prefix
190190
curr = curr.parent
191-
assert curr.location is not None
191+
if not curr.location:
192+
continue
192193
external_location = ExternalLocation(curr.location, len(list(curr.all_tables())))
193194
external_locations.append(external_location)
194195
continue

0 commit comments

Comments
 (0)