Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-03-27 19:37:17 +0300
committerlovetox <philipp@hoerist.com>2022-03-27 19:38:14 +0300
commit40abcc5716d238235cf46d90ddffa9bbf68b0139 (patch)
tree30462924de03e976555d73610a1752fa81fe7022 /.githooks
parentba31782c7582fe67fb6c3db32ddc50fb7d7a3aac (diff)
ci: Update git update hook
Diffstat (limited to '.githooks')
-rwxr-xr-x.githooks/update9
1 files changed, 7 insertions, 2 deletions
diff --git a/.githooks/update b/.githooks/update
index 8be62f7ca..e274919ad 100755
--- a/.githooks/update
+++ b/.githooks/update
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import annotations
@@ -33,7 +33,12 @@ def get_commit_shas(start_ref: str, end_ref: str) -> List[str]:
def enforce_message_rules(subject: str) -> None:
- tag, subject = subject.split(': ', maxsplit=1)
+ try:
+ tag, subject = subject.split(': ', maxsplit=1)
+ except ValueError:
+ print('Unknown commit message tag:', subject)
+ sys.exit(1)
+
if tag not in ALLOWED_TAGS:
print('Unknown commit message tag:', tag)
sys.exit(1)