From 6ca8dce00479c1704b4be3f4a93d146a3bf6a45c Mon Sep 17 00:00:00 2001 From: Lisa Gnedt Date: Sun, 8 Mar 2026 17:59:17 +0100 Subject: [PATCH 1/2] Fix error handling during type autodetection in create mode When specifying an unknown filename without type in create mode the exception is not handled correctly: $ cfv -C -f asdf Traceback (most recent call last): File "/persist/cfv/test/cfv", line 9, in cfv.common.main() ~~~~~~~~~~~~~~~^^ File "/persist/cfv/lib/cfv/common.py", line 2314, in main raise CFVValueError('specify a filetype with -t, or use standard extension') cfv.exceptions.CFVValueError: specify a filetype with -t, or use standard extension This fix handles and displays the error correctly: $ cfv -C -f asdf cfv: specify a filetype with -t, or use standard extension --- lib/cfv/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cfv/common.py b/lib/cfv/common.py index 2148fff..b7ff0d4 100644 --- a/lib/cfv/common.py +++ b/lib/cfv/common.py @@ -2215,7 +2215,8 @@ def main(argv=None): testa = a[:-3] cftype = cftypes.auto_filename_match(a, testa) if not cftype: - raise CFVValueError('specify a filetype with -t, or use standard extension') + view.perror('cfv: specify a filetype with -t, or use standard extension') + sys.exit(1) make(cftype, a, args) if mode == 0: From bca8f090e0ce2fe4181d9b87d6b4460e5f4b6fc7 Mon Sep 17 00:00:00 2001 From: Lisa Gnedt Date: Sun, 8 Mar 2026 18:04:13 +0100 Subject: [PATCH 2/2] Add Changelog entry --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index a35bd11..4181461 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ 2025-xx-xx - v3.2.1.dev0: * WARNING: This is a development snapshot, not a stable release. + * Fix error handling during type autodetection in create mode. 2025-11-02 - v3.2.0: * Drop support for Python 3.6.