cve-update-nvd2-native: added the missing http import
PATCH 1/1 cve-update-nvd2-native: added the missing http import
--- meta/recipes-core/meta/cve-update-nvd2-native.bb | 1 + 1 file changed, 1 insertion(+)
meta/recipes-core/meta/cve-update-nvd2-native.bb +1 -0
@@ -118,6 +118,7 @@ def nvd_request_next(url, api_key, args): import urllib.request import urllib.parse import gzip + import http headers = {} if api_key:
Signature · 1 line
2.34.1
Hi,
Quoted 10 lines · Jan Vermaete
Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-core/meta/cve-update-nvd2-native.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0
meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 121
Quoted 4 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +1
-0@@ -118,6 +118,7 @@ def nvd_request_next(url, api_key, args): import urllib.request import urllib.parse import gzip + import http
If this is only for the "except http.client.IncompleteRead:" line 146[1], wouldn't it be better to fix the catched exception to match what urllib can
throw or to remove the except block entirely?
I've triggered the same error as you but chose to remove the except block to get my code running.
[1]: https://git.yoctoproject.org/poky/tree/meta/recipes-core/meta/cve-update-nvd2-native.bb#n146
meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 124
Quoted 3 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0headers = {} if api_key:
Regards,
Signature · 2 lines
Yoann Congal Smile ECS - Tech Expert
Hi,
I have no preference on how to fix it.
I intended to stay as close as possible to the code of Marta
Br.
Quoted 43 lines · Yoann Congal
Hi,
Quoted 10 lines · Jan Vermaete
Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-core/meta/cve-update-nvd2-native.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 121
Quoted 4 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +1
-0@@ -118,6 +118,7 @@ def nvd_request_next(url, api_key, args): import urllib.request import urllib.parse import gzip + import httpIf this is only for the "except http.client.IncompleteRead:" line 146[1], wouldn't it be better to fix the catched exception to match what urllib can
throw or to remove the except block entirely?I've triggered the same error as you but chose to remove the except block to get my code running.
[1]: https://git.yoctoproject.org/poky/tree/meta/recipes-core/meta/cve-update-nvd2-native.bb#n146
meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 124
Quoted 3 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0headers = {} if api_key:Regards,
--
Yoann Congal
Smile ECS - Tech Expert-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179946): https://lists.openembedded.org/g/openembedded-core/message/179946
Mute This Topic: https://lists.openembedded.org/mt/98216121/2167232
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Jan Vermaete “Success is a self-correcting phenomenom.” -- Gary Hamel
Quoted 4 lines · jan vermaete
Hi,
I have no preference on how to fix it.
I intended to stay as close as possible to the code of Marta
Yes, I see that. I'm okay with your patch as-is since the current code is not coherent.
But, I don't see how we can get this exception from urllib... Maybe someone with more knowledge in urllib can tell us?
Regards,
Quoted 48 lines
Br.
Quoted 43 lines · Yoann Congal
Hi,
Quoted 10 lines · Jan Vermaete
Signed-off-by Jan Vermaete <[email protected]>--- meta/recipes-core/meta/cve-update-nvd2-native.bb | 1 + 1 file changed, 1 insertion(+)meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 121
Quoted 4 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +1
-0@@ -118,6 +118,7 @@ def nvd_request_next(url, api_key, args): import urllib.request import urllib.parse import gzip + import httpIf this is only for the "except http.client.IncompleteRead:" line 146[1], wouldn't it be better to fix the catched exception to match what urllib can
throw or to remove the except block entirely?I've triggered the same error as you but chose to remove the except block to get my code running.
[1]: https://git.yoctoproject.org/poky/tree/meta/recipes-core/meta/cve-update-nvd2-native.bb#n146
meta/recipes-core/meta/cve-update-nvd2-native.bb def nvd_request_next(url, api_key, args): · line 124
Quoted 3 lines
meta/recipes-core/meta/cve-update-nvd2-native.bb +0
-0headers = {} if api_key:Regards,
--
Yoann Congal
Smile ECS - Tech Expert-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#179946): https://lists.openembedded.org/g/openembedded-core/message/179946
Mute This Topic: https://lists.openembedded.org/mt/98216121/2167232
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Yoann Congal Smile ECS - Tech Expert
Quoted 13 lines · Yoann Congal
Quoted 4 lines · jan vermaete
Hi,
I have no preference on how to fix it.
I intended to stay as close as possible to the code of MartaYes, I see that. I'm okay with your patch as-is since the current code is not coherent.
But, I don't see how we can get this exception from urllib... Maybe someone with more knowledge in urllib can tell us?
I'm OK to add the import http. If you remove the except block, you will get errors from time to time (in my setup most of the time when you do a complete download).
Kind regards,
Marta