From 989eda89068e0deb546a69fcadd21262c4be1553 Mon Sep 17 00:00:00 2001 From: GeorgianaElena Date: Thu, 11 Jul 2019 20:51:51 +0300 Subject: [PATCH] Append admin cmd option --- tljh/installer.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tljh/installer.py b/tljh/installer.py index 05055e2..9dc1c89 100644 --- a/tljh/installer.py +++ b/tljh/installer.py @@ -286,7 +286,9 @@ def ensure_admins(admins): config = {} config['users'] = config.get('users', {}) - config['users']['admin'] = list(admins) + # Flatten admin lists + config['users']['admin'] = [admin for admin_sublist in admins + for admin in admin_sublist] with open(config_path, 'w+') as f: yaml.dump(config, f) @@ -440,6 +442,7 @@ def main(): argparser.add_argument( '--admin', nargs='*', + action='append', help='List of usernames set to be admin' ) argparser.add_argument(