From: Zooko O'Whielacronx Date: Sat, 1 Mar 2008 03:29:42 +0000 (-0700) Subject: wui/wapi/webish: HTML form checkboxes send the value "on", so let's interpret that... X-Git-Tag: allmydata-tahoe-0.9.0~92 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/css/flags?a=commitdiff_plain;h=30c9b21d6b5796da4bfc719b4c546b40a0ab6877;p=tahoe-lafs%2Ftahoe-lafs.git wui/wapi/webish: HTML form checkboxes send the value "on", so let's interpret that as boolean true --- 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