From ae89547b70f5a102709d16ae4ebb091491cca10e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 7 Dec 2020 11:52:17 +0800 Subject: [PATCH] bugfix --- kivyblocks/blocks.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kivyblocks/blocks.py b/kivyblocks/blocks.py index cc7998d..45cc64c 100755 --- a/kivyblocks/blocks.py +++ b/kivyblocks/blocks.py @@ -496,16 +496,20 @@ class Blocks(EventDispatcher): if name == 'urlwidget': opts = desc.get('options').copy() + addon = desc.get('extend') url = opts.get('url') if url is None: self.dispatch('on_failed',Exception('miss url')) - def cb(o,d): + def cb(addon,o,d): + if addon is not None: + d = dictExtend(d,addon) doit(d) if opts.get('url'): del opts['url'] - self.getUrlData(url,callback=cb,errback=doerr,**opts) + self.getUrlData(url,callback=partial(cb,addon), + errback=doerr,**opts) return doit(desc)