mimetype indexer: fails with TypeError: 'NoneType' object is not subscriptable
[2019-01-08 03:26:21,174: ERROR/ForkPoolWorker-7] Problem when computing metadata.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/swh/indexer/indexer.py", line 501, in run
n=self.config['write_batch_size']):
File "/usr/lib/python3/dist-packages/swh/core/utils.py", line 41, in grouper
for _data in itertools.zip_longest(*args, fillvalue=None):
File "/usr/lib/python3/dist-packages/swh/indexer/indexer.py", line 468, in _index_with_skipping_already_done
start, _end, contents)
File "/usr/lib/python3/dist-packages/swh/indexer/indexer.py", line 444, in _index_contents
if not isinstance(res['id'], bytes):
TypeError: 'NoneType' object is not subscriptable
Introduced in !434 (closed). This check should be done only if res is not None (which can be ;).
Migrated from T1462 (view on Phabricator)
Edited by Phabricator Migration user