From d1664f3502debaba3ddd4f0fe087122d894b6377 Mon Sep 17 00:00:00 2001
From: Adriaan de Groot <groot@kde.org>
Date: Fri, 9 Sep 2022 09:56:56 +0200
Subject: [PATCH] [services-systemd] Correct Python key-checking

`has_key()` is a Python2-era form; use the `in` operator insteda.
---
 src/modules/services-systemd/main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/services-systemd/main.py b/src/modules/services-systemd/main.py
index ef2984fbae..19c5974d64 100644
--- a/src/modules/services-systemd/main.py
+++ b/src/modules/services-systemd/main.py
@@ -42,7 +42,7 @@ def systemctl(units):
             action = "enable"
             mandatory = False
         else:
-            if not unit.has_key("name"):
+            if "name" not in unit:
                 libcalamares.utils.error("The key 'name' is missing from the mapping {_unit!s}. Continuing to the next unit.".format(_unit=str(unit)))
                 continue 
             name = unit["name"]
-- 
GitLab