We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 998c05b commit 8f576a3Copy full SHA for 8f576a3
mariadb_pdf/setup/kb_urls.py
@@ -60,12 +60,16 @@ def read_csv(num_rows: int, port: int) -> list[CsvItem]:
60
61
def apply_depth(kb_urls: list[CsvItem]) -> list[CsvItem]:
62
depths = []
63
- for row in kb_urls:
+ for line, row in enumerate(kb_urls):
64
if row.depth >= len(depths):
65
depths.extend([0] * (row.depth-len(depths)))
66
elif row.depth < len(depths):
67
for _ in range(len(depths)-row.depth):
68
depths.pop()
69
+ if len(depths) == 0:
70
+ print("error: invalid depth on line: ", line + 1)
71
+ exit(0)
72
+
73
depths[row.depth-1] += 1
74
row.depth_str = '.'.join([str(num) for num in depths])
75
while row.depth_str.startswith("0."):
0 commit comments