diff --git a/progit/hooks/mail.py b/progit/hooks/mail.py index da9e4ba..fb59c27 100644 --- a/progit/hooks/mail.py +++ b/progit/hooks/mail.py @@ -82,23 +82,22 @@ class Mail(BaseHook): repo_obj = pygit2.Repository(repopath) # Configure the hook - if dbobj.mail_to: - repo_obj.config.set_multivar( - 'multimailhook.mailingList', - '', - dbobj.mail_to - ) - repo_obj.config.set_multivar( - 'multimailhook.environment', '', 'gitolite') - - # Install the hook itself - shutil.copyfile( - os.path.join(hook_files, 'git_multimail.py'), - os.path.join(repopath, 'hooks', 'post-receive.mail') - ) - os.chmod( - os.path.join(repopath, 'hooks', 'post-receive.mail'), - 0755) + repo_obj.config.set_multivar( + 'multimailhook.mailingList', + '', + dbobj.mail_to + ) + repo_obj.config.set_multivar( + 'multimailhook.environment', '', 'gitolite') + + # Install the hook itself + shutil.copyfile( + os.path.join(hook_files, 'git_multimail.py'), + os.path.join(repopath, 'hooks', 'post-receive.mail') + ) + os.chmod( + os.path.join(repopath, 'hooks', 'post-receive.mail'), + 0755) @classmethod def remove(cls, project):