diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2007-12-15 05:58:36 -0800 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2007-12-18 01:12:21 -0800 |
commit | 204c2e0781ce89fd8abb7f1249920ce90414f9f6 (patch) | |
tree | 08ccb761125a0276ae1c88037a59488a89e67ed6 /gitosis/run_hook.py | |
parent | Pylint cleanups for run_hook.py. (diff) | |
download | gitosis-dakkar-204c2e0781ce89fd8abb7f1249920ce90414f9f6.tar.gz gitosis-dakkar-204c2e0781ce89fd8abb7f1249920ce90414f9f6.tar.bz2 gitosis-dakkar-204c2e0781ce89fd8abb7f1249920ce90414f9f6.zip |
Factor out functions with a common errno ignore block.
Diffstat (limited to 'gitosis/run_hook.py')
-rw-r--r-- | gitosis/run_hook.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/gitosis/run_hook.py b/gitosis/run_hook.py index 790a5f9..068dbe1 100644 --- a/gitosis/run_hook.py +++ b/gitosis/run_hook.py @@ -27,13 +27,7 @@ def post_update(cfg, git_dir): 6. Update the Gitosis SSH keys. """ export = os.path.join(git_dir, 'gitosis-export') - try: - shutil.rmtree(export) - except OSError, ex: - if ex.errno == errno.ENOENT: - pass - else: - raise + util.rmtree(export) repository.export(git_dir=git_dir, path=export) os.rename( os.path.join(export, 'gitosis.conf'), |