示例#1
0
def getB3versionInfo():
    """
    Returns a tuple with B3 version information.
    :return: version, platform, architecture :type: tuple
    """
    return __version__, getPlatform(), right_cut(platform.architecture()[0],
                                                 'bit')
示例#2
0
    def unlinkdemo(self):
        """
        Delete the demo connected to this jumprun.
        """
        if self.demo is None:
            self.p.debug('not removing jumprun demo for client @%s : no demo has been recorded' % self.client.id)
        else:

            # check for fs_game not to be None
            if self.p.console.game.fs_game is None:

                try:
                    self.p.console.game.fs_game = right_cut(self.p.console.getCvar('fs_game').getString(), '/')
                    self.p.debug('retrieved server cvar <fs_game> : %s' % self.p.console.game.fs_game)
                except AttributeError, e:
                    self.p.warning('could not retrieve server cvar <fs_game> : %s' % e)
                    return

            # check for fs_basepath not to be None
            if self.p.console.game.fs_basepath is None:

                try:
                    self.p.console.game.fs_basepath = self.p.console.getCvar('fs_basepath').getString().rstrip('/')
                    self.p.debug('retrieved server cvar <fs_basepath> : %s' % self.p.console.game.fs_basepath)
                except AttributeError, e:
                    self.p.warning('could not retrieve server cvar <fs_basepath> : %s' % e)
                    return
    def unlinkdemo(self):
        """
        Delete the demo connected to this jumprun.
        """
        if self.demo is None:
            self.p.debug('not removing jumprun demo for client @%s : no demo has been recorded' % self.client.id)
        else:

            # check for fs_game not to be None
            if self.p.console.game.fs_game is None:

                try:
                    self.p.console.game.fs_game = right_cut(self.p.console.getCvar('fs_game').getString(), '/')
                    self.p.debug('retrieved server cvar <fs_game> : %s' % self.p.console.game.fs_game)
                except AttributeError, e:
                    self.p.warning('could not retrieve server cvar <fs_game> : %s' % e)
                    return

            # check for fs_basepath not to be None
            if self.p.console.game.fs_basepath is None:

                try:
                    self.p.console.game.fs_basepath = self.p.console.getCvar('fs_basepath').getString().rstrip('/')
                    self.p.debug('retrieved server cvar <fs_basepath> : %s' % self.p.console.game.fs_basepath)
                except AttributeError, e:
                    self.p.warning('could not retrieve server cvar <fs_basepath> : %s' % e)
                    return
def getB3versionInfo():
    """
    Returns a tuple with B3 version information.
    :return: version, platform, architecture :type: tuple
    """
    return __version__, getPlatform(), right_cut(platform.architecture()[0], 'bit')