From e28540e371a02e7bc6b8e1fc3fa33eb842db09aa Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 8 Mar 2023 01:22:21 +0300 Subject: [PATCH] mc: Report error via `sys.exit(message)` --- bin/mc_type.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/mc_type.py b/bin/mc_type.py index 70dcc2b..8292646 100755 --- a/bin/mc_type.py +++ b/bin/mc_type.py @@ -19,7 +19,8 @@ elif mc_version.startswith('GNU Midnight Commander') or \ mc_version.startswith('The Midnight Commander'): mc_version = mc_version.split()[3] else: - raise ValueError('Unknown mc version') + sys.exit('Unknown mc version') + if '.' in mc_version: major, minor = [int(v) for v in mc_version.split('.')[:2]] if major < 4: -- 2.39.5