From 2087125cd5ee7a32ceded4feee0bb1fdd399b31f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 23 May 2023 18:25:46 +0100 Subject: [PATCH] Warn if trying to remove the admin account --- epicyon.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/epicyon.py b/epicyon.py index dd723b2c7..3c98fb499 100644 --- a/epicyon.py +++ b/epicyon.py @@ -2882,6 +2882,11 @@ def _command_options() -> None: argb.rmaccount = argb.deactivate if argb.rmaccount: + admin_nickname = get_config_param(base_dir, 'admin') + if admin_nickname: + if admin_nickname == argb.rmaccount: + print(argb.rmaccount + ' is the admin account') + sys.exit() if '@' in argb.rmaccount: nickname = argb.rmaccount.split('@')[0] domain = argb.rmaccount.split('@')[1]