def trap_call(object, function, *args, **kwargs): """Convenience function do a trapcall.trap_call, where when is 'While talking to the network' """ return trapcall.time_trap_call("Calling %s on %s" % (function, object), function, *args, **kwargs)
def process_command(self, comm): trapcall.time_trap_call("Running: %s" % comm, self.run_command, comm)