diff options
| author | Teddy Wing | 2023-08-08 20:01:29 +0200 |
|---|---|---|
| committer | Teddy Wing | 2023-08-08 20:01:29 +0200 |
| commit | 71770f3e23f7a3a54ef29b53d8fce9982a8221cf (patch) | |
| tree | 63d5a942ee9f9753fcd826b4f464ab799362ce99 | |
| parent | e29defb64605062d44fd029a1f524464627d1014 (diff) | |
| download | cws-status-71770f3e23f7a3a54ef29b53d8fce9982a8221cf.tar.bz2 | |
cws-status: Investigate out of bounds error
Sometimes I was getting the following exception which caused the program
to fail:
$ cws-status 'AODocs - Universal'
Traceback (most recent call last):
File ".../cws-status/cws-status", line 117, in <module>
matched_extensions.append((name, item_statuses[i]))
IndexError: list index out of range
Add a couple of print statements to see what's going on.
| -rw-r--r-- | cws-status | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -111,6 +111,8 @@ item_statuses = tree.xpath('//table[//th[text()="Item"]]/tbody/tr/td[7]/text()') matched_extensions = [] for i, name in enumerate(item_names_versions): + print(i, name, item_names_versions, item_statuses) + print(i, item_statuses) if re.search(regex, name): matched_extensions.append((name, item_statuses[i])) |
