From b66f5110d7780f7e4b3ba4d7f0250d0969b53a3b Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Aug 07 2017 21:24:04 +0000 Subject: Fix refresh-gitolite Signed-off-by: Patrick Uiterwijk --- diff --git a/pagure/cli/admin.py b/pagure/cli/admin.py index 0d1482d..e9f66ab 100644 --- a/pagure/cli/admin.py +++ b/pagure/cli/admin.py @@ -23,6 +23,7 @@ if 'PAGURE_CONFIG' not in os.environ \ import pagure.exceptions # noqa: E402 import pagure.lib # noqa: E402 import pagure.lib.git # noqa: E402 +import pagure.lib.git_auth # noqa: E402 from pagure import (SESSION, APP, generate_user_key_files) # noqa: E402 @@ -164,7 +165,8 @@ def do_generate_acl(_): ignored as there are no argument to pass to this action. """ - cmd = pagure.lib.git._get_gitolite_command() + helper = pagure.lib.git_auth.get_git_auth_helper(APP.config['GITOLITE_BACKEND']) + cmd = helper._get_gitolite_command() if not cmd: raise pagure.exceptions.PagureException( '/!\ un-able to generate the right gitolite command') @@ -172,7 +174,7 @@ def do_generate_acl(_): 'Do you want to re-generate the gitolite.conf file then ' 'calling: %s' % cmd) if _ask_confirmation(): - pagure.lib.git._generate_gitolite_acls() + helper.generate_acls(-1) print('Gitolite ACLs updated')