Allow external plugins to return no value
authormartin f. krafft <madduck@madduck.net>
Fri, 21 Mar 2008 18:12:12 +0000 (19:12 +0100)
committerJoey Hess <joey@kodama.kitenet.net>
Fri, 21 Mar 2008 19:07:10 +0000 (15:07 -0400)
commite3624de63c799427fbd95fa5bbef9462f95912c6
tree532425e6ec54e0d039091582f44782081353f8ef
parent99fce0af0d4e99bc81ef7847bfbe77662763e805
Allow external plugins to return no value

Instead of using the XML-RPC v2 extension <nil/>, which Perl's
XML::RPC::Parser does not (yet) support (Joey's patch is pending), we
agreed on a sentinel: {'null':''}, that is, a hash with a single key
"null" pointing to the empty string.

The Python proxy automatically converts None appropriately and raises an
exception if a hook function should, by weird coincidence, attempt to
return {'null':''}.

Signed-off-by: martin f. krafft <madduck@madduck.net>
IkiWiki/Plugin/external.pm
plugins/proxy.py
plugins/pythondemo