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 8f576a3 commit d80ff90Copy full SHA for d80ff90
mariadb_pdf/setup/kb_urls.py
@@ -60,15 +60,15 @@ 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 line, row in enumerate(kb_urls):
+ for row in 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)
+ print("error: invalid depth for url: ", row.url)
+ exit(1)
72
73
depths[row.depth-1] += 1
74
row.depth_str = '.'.join([str(num) for num in depths])
0 commit comments