mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-14 17:59:59 +00:00
python3-django: handle non-existing import from CVE patch
This change is for python3-django_2.2.28. During backporting a patch for CVE-2024-56374, an import got into the patch for v2.2.28 that does not exist yet in that version. This patch handles this import with a fallback to prevent throwing and ImportError. Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From b56516c12f05cf56e65cc960f865d5ebdae733e2 Mon Sep 17 00:00:00 2001
|
||||
From: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
Date: Wed, 14 Jan 2026 11:05:36 +0100
|
||||
Subject: [PATCH] fix ipv6 test
|
||||
|
||||
During backporting a patch for CVE-2024-56374, an import got into
|
||||
the patch for v2.2.28 that does not exist yet in that version.
|
||||
|
||||
This patch handles this import with a fallback to prevent throwing
|
||||
and ImportError.
|
||||
|
||||
Upstream-Status: Inappropriate [Backport specific]
|
||||
Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
|
||||
---
|
||||
tests/utils_tests/test_ipv6.py | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/tests/utils_tests/test_ipv6.py b/tests/utils_tests/test_ipv6.py
|
||||
index 1ac6763..3b21948 100644
|
||||
--- a/tests/utils_tests/test_ipv6.py
|
||||
+++ b/tests/utils_tests/test_ipv6.py
|
||||
@@ -8,8 +8,10 @@ from django.utils.ipv6 import (
|
||||
clean_ipv6_address,
|
||||
is_valid_ipv6_address,
|
||||
)
|
||||
-from django.utils.version import PY310
|
||||
-
|
||||
+try:
|
||||
+ from django.utils.version import PY310
|
||||
+except ImportError:
|
||||
+ PY310 = None
|
||||
|
||||
class TestUtilsIPv6(SimpleTestCase):
|
||||
|
||||
Reference in New Issue
Block a user