aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-12-15 05:51:44 -0800
committerRobin H. Johnson <robbat2@gentoo.org>2007-12-18 01:12:21 -0800
commit80eafc53971bae7f12a7dfe38a2c5c78aff74b53 (patch)
treeae34de552321d11162522256b2d47fbe1f949252
parentPylint cleanups again. (diff)
downloadgitosis-dakkar-80eafc53971bae7f12a7dfe38a2c5c78aff74b53.tar.gz
gitosis-dakkar-80eafc53971bae7f12a7dfe38a2c5c78aff74b53.tar.bz2
gitosis-dakkar-80eafc53971bae7f12a7dfe38a2c5c78aff74b53.zip
Pylint cleanups for run_hook.py.
-rw-r--r--gitosis/run_hook.py21
1 files changed, 19 insertions, 2 deletions
diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py
index f9a009d..790a5f9 100644
--- a/gitosis/run_hook.py
+++ b/gitosis/run_hook.py
@@ -16,11 +16,21 @@ from gitosis import app
from gitosis import util
def post_update(cfg, git_dir):
+ """
+ post-update hook for the Gitosis admin directory.
+
+ 1. Make an export of the admin repo to a clean directory.
+ 2. Move the gitosis.conf file to it's destination.
+ 3. Update the repository descriptions.
+ 4. Update the projects.list file.
+ 5. Update the repository export markers.
+ 6. Update the Gitosis SSH keys.
+ """
export = os.path.join(git_dir, 'gitosis-export')
try:
shutil.rmtree(export)
- except OSError, e:
- if e.errno == errno.ENOENT:
+ except OSError, ex:
+ if ex.errno == errno.ENOENT:
pass
else:
raise
@@ -46,7 +56,13 @@ def post_update(cfg, git_dir):
)
class Main(app.App):
+ """gitosis-run-hook program."""
+ # W0613 - They also might ignore arguments here, where the descendant
+ # methods won't.
+ # pylint: disable-msg=W0613
+
def create_parser(self):
+ """Declare the input for this program."""
parser = super(Main, self).create_parser()
parser.set_usage('%prog [OPTS] HOOK')
parser.set_description(
@@ -54,6 +70,7 @@ class Main(app.App):
return parser
def handle_args(self, parser, cfg, options, args):
+ """Parse the input for this program."""
try:
(hook,) = args
except ValueError: