From 204c2e0781ce89fd8abb7f1249920ce90414f9f6 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 15 Dec 2007 05:58:36 -0800 Subject: Factor out functions with a common errno ignore block. --- gitosis/gitdaemon.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'gitosis/gitdaemon.py') diff --git a/gitosis/gitdaemon.py b/gitosis/gitdaemon.py index e1e0e9a..e529302 100644 --- a/gitosis/gitdaemon.py +++ b/gitosis/gitdaemon.py @@ -30,13 +30,7 @@ def allow_export(repopath): def deny_export(repopath): """Remove the ``git-daemon-export-ok`` marker for a given repository.""" path = export_ok_path(repopath) - try: - os.unlink(path) - except OSError, ex: - if ex.errno == errno.ENOENT: - pass - else: - raise + util.unlink(path) def _extract_reldir(topdir, dirpath): """ -- cgit v1.2.3