diff --git a/src/installer/scripts.py b/src/installer/scripts.py index 5de5e7de..1a1ac99f 100644 --- a/src/installer/scripts.py +++ b/src/installer/scripts.py @@ -126,7 +126,7 @@ def _get_launcher_data(self, kind: "LauncherKind") -> Optional[bytes]: key = (self.section, kind) try: name = _ALLOWED_LAUNCHERS[key] - except KeyError as exc: + except KeyError: error = f"{key!r} not in {sorted(_ALLOWED_LAUNCHERS)!r}" raise InvalidScript(error) from None return read_binary(_scripts, name)