From 30c9b21d6b5796da4bfc719b4c546b40a0ab6877 Mon Sep 17 00:00:00 2001 From: Zooko O'Whielacronx Date: Fri, 29 Feb 2008 20:29:42 -0700 Subject: [PATCH] wui/wapi/webish: HTML form checkboxes send the value "on", so let's interpret that as boolean true --- src/allmydata/webish.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/webish.py b/src/allmydata/webish.py index f8da6271..bb584503 100644 --- a/src/allmydata/webish.py +++ b/src/allmydata/webish.py @@ -33,8 +33,8 @@ class ILocalAccess(Interface): can talk to the webserver control over the local (disk) filesystem.""" def boolean_of_arg(arg): - assert arg.lower() in ("true", "t", "1", "false", "f", "0") - return arg.lower() in ("true", "t", "1") + assert arg.lower() in ("true", "t", "1", "false", "f", "0", "on", "off") + return arg.lower() in ("true", "t", "1", "on") def get_arg(req, argname, default=None, multiple=False): """Extract an argument from either the query args (req.args) or the form -- 2.45.2