libqtile/command.py
def cmd_function(self, function, *args, **kwargs):
        """Call a function with current object as argument"""
        try:
            function(self, *args, **kwargs)
        except Exception:
            error = traceback.format_exc()
            logger.error('Exception calling "%s":\n%s' % (function, error))
Call a function with current object as argument
Call a function with current object as argument
Call a function with current object as argument
def cmd_function(self, function, *args, **kwargs):
        try:
            function(self, *args, **kwargs)
        except Exception:
            error = traceback.format_exc()
            logger.error('Exception calling "%s":\n%s' % (function, error))
def cmd_function ( self , function , * args , ** kwargs ) : try : function ( self , * args , ** kwargs ) except Exception : error = traceback . format_exc ( ) logger . error ( 'Exception calling "%s":\n%s' % ( function , error ) )
Call a function with current object as argument
Call a function with current object as argument
"""Call a function with current object as argument"""
self
function