All pastes #2097265 Raw Edit

Something

public text v1 · immutable
#2097265 ·published 2011-12-29 23:08 UTC
rendered paste body
ERROR: E | platform.py | MainThread | Line 78 | Cannot determine version of XBMC from build version: 11.0-BETA1 Git:Unknown. Returning 0.0

--CUT--

def xbmcVersion(self):
        version = 0.0
        vs = xbmc.getInfoLabel('System.BuildVersion')
        try: 
            # sample input: '10.1 Git:Unknown'
            version = float(vs.split()[0])
        except ValueError:
            try:
                # sample input: 'PRE-11.0 Git:Unknown'
                version = float(vs.split()[0].split('-')[1])

-- CUT --