[PATCH 1 of 1] changeset: don't crash on malformed whitespace parameter
Andrew Shadura
andrew at shadura.me
Thu Feb 26 10:50:25 EST 2015
# HG changeset patch
# User Andrew Shadura <andrew at shadura.me>
# Date 1424965487 -3600
# Thu Feb 26 16:44:47 2015 +0100
# Node ID ec1aa401f1e2e25a0f4b43b7dddba12e11d96f17
# Parent c583bfc8785b96436e193aa1e2acc2820e436c7c
changeset: don't crash on malformed whitespace parameter
diff --git a/kallithea/controllers/changeset.py b/kallithea/controllers/changeset.py
--- a/kallithea/controllers/changeset.py
+++ b/kallithea/controllers/changeset.py
@@ -75,7 +75,10 @@ def get_ignore_ws(fid, GET):
ig_ws_global = GET.get('ignorews')
ig_ws = filter(lambda k: k.startswith('WS'), GET.getall(fid))
if ig_ws:
- return int(ig_ws[0].split(':')[-1])
+ try:
+ return int(ig_ws[0].split(':')[-1])
+ except ValueError:
+ pass
return ig_ws_global
More information about the kallithea-general
mailing list