From: Oleg Broytman Date: Tue, 7 Mar 2023 22:22:21 +0000 (+0300) Subject: mc: Report error via `sys.exit(message)` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=e28540e371a02e7bc6b8e1fc3fa33eb842db09aa;p=dotfiles.git mc: Report error via `sys.exit(message)` --- 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: