-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
We're occasionally getting an error,
File "/usr/local/lib/python3.9/site-packages/gitinfo/gitinfo.py", line 108, in get_git_info
return get_git_info_dir(gitdir)
File "/usr/local/lib/python3.9/site-packages/gitinfo/gitinfo.py", line 86, in get_git_info_dir
r = get_pack_info(idx_file, gi)
File "/usr/local/lib/python3.9/site-packages/gitinfo/pack_reader.py", line 176, in get_pack_info
data = get_object(fin, pack_idx)
File "/usr/local/lib/python3.9/site-packages/gitinfo/pack_reader.py", line 149, in get_object
data, r = decode_delta(fin, data, delta_res, pack_idx, offset)
File "/usr/local/lib/python3.9/site-packages/gitinfo/pack_reader.py", line 110, in decode_delta
r += oo[offset : offset + size]
TypeError: 'NoneType' object is not subscriptableThis seems to be caused by get_object returning None to decode_delta (in these lines). Unfortunately, this seems to only happen in CI and is not locally reproducible, so I don't have any specific information about the contents of the git repo.
That said, because get_info can return None, calls to it should probably be checked for None and handled appropriately.
Metadata
Metadata
Assignees
Labels
No labels