From 0ce2083c717e5406158e00af9087cdf2300597fe Mon Sep 17 00:00:00 2001 From: sudolulo Date: Mon, 15 Jun 2026 15:10:16 +0000 Subject: [PATCH] Remove speculative AttributeError guard in URL-fix wrapper --- patch/sitecustomize.py | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/patch/sitecustomize.py b/patch/sitecustomize.py index 75f8b48..fd5dbee 100644 --- a/patch/sitecustomize.py +++ b/patch/sitecustomize.py @@ -188,14 +188,7 @@ def _patch_restic(module): try: return dataclasses.replace(result, cmd=cmd) except TypeError: - try: - return result._replace(cmd=cmd) - except AttributeError: - sys.stderr.write( - "[truecloud-patch] WARNING: cannot fix repo URL; " - f"unexpected ResticConfig type {type(result).__name__!r}\n" - ) - return result + return result._replace(cmd=cmd) break if i and cmd[i - 1] in ("-r", "--repo", "--repository"): scheme, sep, rest = part.partition(":") @@ -204,14 +197,7 @@ def _patch_restic(module): try: return dataclasses.replace(result, cmd=cmd) except TypeError: - try: - return result._replace(cmd=cmd) - except AttributeError: - sys.stderr.write( - "[truecloud-patch] WARNING: cannot fix repo URL; " - f"unexpected ResticConfig type {type(result).__name__!r}\n" - ) - return result + return result._replace(cmd=cmd) break return result