[Buildroot] scanpypi tool python error - local variable 'download' referenced before assignment
Yegor Yefremov
yegorslists at googlemail.com
Fri Jun 8 05:25:25 UTC 2018
Hi all,
On Thu, Jun 7, 2018 at 11:16 PM, Arnout Vandecappelle <arnout at mind.be> wrote:
>
>
> On 06-06-18 17:29, Jaap Crezee wrote:
>> Hi all,
>>
>>
>> Is this a known issue?
>>
>> [jaap at jaap /data/work/htc/git/buildroot_development ]$ git log -1
>> commit f3d114a1effd8a6ef773bee14fe49ea6d8d7c350 (HEAD, tag: 2018.05)
>> Author: Peter Korsgaard <peter at korsgaard.com>
>> Date: Fri Jun 1 22:22:57 2018 +0200
>>
>> Update for 2018.05
>>
>> Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
>> [jaap at jaap /data/work/htc/git/buildroot_development ]$ ./utils/scanpypi azure-iothub-device-client
>> buildroot package name for azure-iothub-device-client: python-azure-iothub-device-client
>> Package: python-azure-iothub-device-client
>> Fetching package azure-iothub-device-client
>> Traceback (most recent call last):
>> File "./utils/scanpypi", line 716, in <module>
>> main()
>> File "./utils/scanpypi", line 648, in main
>> package.download_package()
>> File "./utils/scanpypi", line 217, in download_package
>> if download.__class__ == six.moves.urllib.error.HTTPError:
>> UnboundLocalError: local variable 'download' referenced before assignment
>> [jaap at jaap /data/work/htc/git/buildroot_development ]$
>
> This happens because the metadata doesn't contain urls.
>
> scanpypi is not at all robust against unexpected metadata contents. I think we
> should add some exception handling there that just prints the metadata (or the
> relevant parts of it), and continues with other packages (in case it's a
> dependency of the package that was requested).
>
> Yegor?
I'll take care about this.
Yegor
More information about the buildroot
mailing list