aboutcode-org / aboutcode-org/purldb
PypiVersionAPI.get_latest_date() crashes when a release entry is missing upload_time_iso_8601
Aperta
- Lingua principale
- HTML
- Stelle
- 67
- Fork
- 69
- Merge medio
- 8g 8h
- PR unite (30g)
- 1
Descrizione
## Summary
`PypiVersionAPI.get_latest_date()` in `packagedb/package_managers.py` can fail when a PyPI release entry is missing `upload_time_iso_8601`.
The current implementation only assigns `current_date` when that field is present, but still uses `current_date` later in the loop even when it was never set. That can raise `UnboundLocalError` instead of skipping the malformed entry.
## Current behavior
A case like this can fail:
```python
downloads = [
{},
{"upload_time_iso_8601": "2010-12-23T05:14:23.509436Z"},
]
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.