From ac310cb93e317cde524d215f201ffb6430ec16b8 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Oct 13 2016 21:20:53 +0000 Subject: Fix the RTD and Force push hooks for the change in location of the plugins Fixes https://pagure.io/pagure/issue/1414 --- diff --git a/pagure/hooks/files/pagure_force_commit_hook.py b/pagure/hooks/files/pagure_force_commit_hook.py index 7809715..dd57bfb 100755 --- a/pagure/hooks/files/pagure_force_commit_hook.py +++ b/pagure/hooks/files/pagure_force_commit_hook.py @@ -18,7 +18,7 @@ if 'PAGURE_CONFIG' not in os.environ \ import pagure import pagure.exceptions import pagure.lib.link -import pagure.ui.plugins +import pagure.lib.plugins abspath = os.path.abspath(os.environ['GIT_DIR']) @@ -40,7 +40,7 @@ def run_as_pre_receive_hook(): reponame, username, namespace) sys.exit(1) - plugin = pagure.ui.plugins.get_plugin('Block non fast-forward pushes') + plugin = pagure.lib.plugins.get_plugin('Block non fast-forward pushes') dbobj = plugin.db_object() # Get the list of branches branches = [ diff --git a/pagure/hooks/files/rtd_hook.py b/pagure/hooks/files/rtd_hook.py index c6aaba4..163aa69 100755 --- a/pagure/hooks/files/rtd_hook.py +++ b/pagure/hooks/files/rtd_hook.py @@ -20,7 +20,7 @@ if 'PAGURE_CONFIG' not in os.environ \ import pagure import pagure.exceptions import pagure.lib.link -import pagure.ui.plugins +import pagure.lib.plugins abspath = os.path.abspath(os.environ['GIT_DIR']) @@ -41,7 +41,7 @@ def run_as_post_receive_hook(): print 'Unknown repo %s of username: %s' % (reponame, username) sys.exit(1) - plugin = pagure.ui.plugins.get_plugin('Read the Doc') + plugin = pagure.lib.plugins.get_plugin('Read the Doc') dbobj = plugin.db_object() # Get the list of branches branches = [