From 86a2bb9afddb593d1d15757daa94eab6ad4f767d Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 21 May 2026 17:20:31 +0200 Subject: [PATCH 1/2] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'git-hooks': 'github:cachix/git-hooks.nix/580633fa3fe5fc0379905986543fd7495481913d' (2026-04-07) → 'github:cachix/git-hooks.nix/61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a' (2026-05-11) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/9a3a5b8400951b3497d2ef8f239f8451175cf3a1' (2026-04-18) → 'github:NixOS/nixpkgs/657e2fa0760e27167cdacb1ec5d84782be312013' (2026-05-21) --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 09221f6..09d4dc9 100644 --- a/flake.lock +++ b/flake.lock @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1775585728, - "narHash": "sha256-8Psjt+TWvE4thRKktJsXfR6PA/fWWsZ04DVaY6PUhr4=", + "lastModified": 1778507602, + "narHash": "sha256-kTwur1wV+01SdqskVMSo6JMEpg71ps3HpbFY2GsflKs=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "580633fa3fe5fc0379905986543fd7495481913d", + "rev": "61ab0e80d9c7ab14c256b5b453d8b3fb0189ba0a", "type": "github" }, "original": { @@ -79,11 +79,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1776475594, - "narHash": "sha256-mxLieVl5lqjd+QUvgHbvpVrvb9d8zox7m+MiRO6FHu8=", + "lastModified": 1779350018, + "narHash": "sha256-fHMrI2uuDNdQy0X6vgDdLoAHEMV4phk8OLtNMra7Vyk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9a3a5b8400951b3497d2ef8f239f8451175cf3a1", + "rev": "657e2fa0760e27167cdacb1ec5d84782be312013", "type": "github" }, "original": { From 10dce12f737c1d63d5decc4569873ff5892864c8 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 21 May 2026 17:28:36 +0200 Subject: [PATCH 2/2] tests/ldap: check regex match return value error[unresolved-attribute]: Attribute `group` is not defined on `None` in union `Match[str] | None` --> testScriptWithTypes:152:21 | 152 | ldap_table_path = re.match('.* =.*ldap:(.*)', conf).group(1) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | --- tests/ldap.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/ldap.nix b/tests/ldap.nix index 5df5580..7a771ad 100644 --- a/tests/ldap.nix +++ b/tests/ldap.nix @@ -198,7 +198,10 @@ in # to the expected value. def test_lookup(postconf_cmdline, key, expected): conf = machine.succeed(postconf_cmdline).rstrip() - ldap_table_path = re.match('.* =.*ldap:(.*)', conf).group(1) + ldap_table_path_match = re.match('.* =.*ldap:(.*)', conf) + if not ldap_table_path_match: + raise RuntimeError(f"Failed to match LDAP table in '{postconf_cmdline}' response") + ldap_table_path = ldap_table_path_match.group(1) value = machine.succeed(f"postmap -q {key} ldap:{ldap_table_path}").rstrip() try: assert value == expected