def execute(self):
        """ print system and cluster info """
        if not self.cmd.is_conn_available():
            return
        if self.cmd.connection.lowest_server_version >= SYSINFO_MIN_VERSION:
            success, rows = self._sys_info()
            self.cmd.exit_code = self.cmd.exit_code or int(not success)
            if success:
                for result in rows:
                    self.cmd.pprint(result.rows, result.cols)
                self.cmd.logger.info(
                    "For debugging purposes you can send above listed information to support@crate.io")
        else:
            tmpl = 'Crate {version} does not support the cluster "sysinfo" command'
            self.cmd.logger.warn(tmpl
                                 .format(version=self.cmd.connection.lowest_server_version))
def execute ( self ) : if not self . cmd . is_conn_available ( ) : return if self . cmd . connection . lowest_server_version >= SYSINFO_MIN_VERSION : success , rows = self . _sys_info ( ) self . cmd . exit_code = self . cmd . exit_code or int ( not success ) if success : for result in rows : self . cmd . pprint ( result . rows , result . cols ) self . cmd . logger . info ( "For debugging purposes you can send above listed information to support@crate.io" ) else : tmpl = 'Crate {version} does not support the cluster "sysinfo" command' self . cmd . logger . warn ( tmpl . format ( version = self . cmd . connection . lowest_server_version ) )
print system and cluster info