aboutsummaryrefslogtreecommitdiffstats
path: root/deployment
diff options
context:
space:
mode:
Diffstat (limited to 'deployment')
-rwxr-xr-xdeployment/mgagit/templates/git-post-receive-hook6
1 files changed, 4 insertions, 2 deletions
diff --git a/deployment/mgagit/templates/git-post-receive-hook b/deployment/mgagit/templates/git-post-receive-hook
index e5c60f39..f0e71619 100755
--- a/deployment/mgagit/templates/git-post-receive-hook
+++ b/deployment/mgagit/templates/git-post-receive-hook
@@ -176,8 +176,10 @@ if __name__ == '__main__':
lastupdated = git_multimail.read_git_output(
['for-each-ref', '--sort=-committerdate', "--format='%(committerdate:iso8601)'", '--count=1', 'refs/heads'],
)
- open(os.path.join(infowebdir, 'last-modified'), 'w').write(lastupdated).close()
- except IOError:
+ modfile = open(os.path.join(infowebdir, 'last-modified'), 'w')
+ modfile.write(lastupdated)
+ modfile.close()
+ except Exception:
pass
git_multimail.main(sys.argv[1:])