aboutcode-org / aboutcode-org/purldb
PypiVersionAPI.get_latest_date() crashes when a release entry is missing upload_time_iso_8601
未關閉
- 主要語言
- HTML
- 星號
- 67
- 分支
- 69
- 平均合併
- 8 天 8 小時
- 30 天內合併 PR
- 1
描述
## 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"},
]
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。