aboutcode-org / aboutcode-org/purldb

PypiVersionAPI.get_latest_date() crashes when a release entry is missing upload_time_iso_8601

オープン
#863 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
HTML
スター
67
フォーク
69
平均マージ
8日 8時間
マージ済み PR(30日)
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。