From 5cd643861b48768a90788f9d6ad3bacf7566e586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonah=20Br=C3=BCchert?= Date: Thu, 23 May 2024 04:02:21 +0200 Subject: Remove broken django version checks --- src/lib/Bcfg2/Server/Core.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/lib/Bcfg2/Server/Core.py') diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index 78eed4b3e..59e9254c1 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -87,11 +87,8 @@ def close_db_connection(func): self.logger.debug("%s: Closing database connection" % threading.current_thread().getName()) - if django.VERSION[0] == 1 and django.VERSION[1] >= 7: - for connection in django.db.connections.all(): - connection.close() - else: - django.db.close_connection() # pylint: disable=E1101 + for connection in django.db.connections.all(): + connection.close() return rv return inner -- cgit v1.2.3-1-g7c22