cleanup some imports
[enigma2.git] / lib / python / Tools / BoundFunction.py
index 5447451dd2d733324235b3ee291b45276473225a..29e8f61c8c50df9d63ed829807dac4b37d19cc1b 100644 (file)
@@ -1,6 +1,11 @@
 class boundFunction:
-       def __init__(self, fnc, *args):
+       def __init__(self, fnc, *args, **kwargs):
                self.fnc = fnc
                self.args = args
-       def __call__(self, *args):
-               self.fnc(*self.args + args)
+               self.kwargs = kwargs
+       def __call__(self, *args, **kwargs):
+               newkwargs = self.kwargs
+               newkwargs.update(kwargs)
+               return self.fnc(*self.args + args, **newkwargs)
+               
+