[Release] Parsedom and other functions

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Kr0nZ Offline
Junior Member
Posts: 46
Joined: Apr 2011
Reputation: 0
Post: #111
(2012-12-29 22:15)cancan101 Wrote:  I am pretty sure this line is buggy:

Code:
if version.find("-") -1:

My guess is the predicate is missing an == . All it does is drop the last character of the version string when no - is found.

I also just came across this bug,
I think its because its checking for a dash in the version string but not checking for a space
I added
Code:
if version.find(" ") -1:
    version = version[:version.find(" ")]
now its working
(This post was last modified: 2013-01-02 04:59 by Kr0nZ.)
find quote
rmk1139 Offline
Junior Member
Posts: 17
Joined: Jan 2011
Reputation: 0
Post: #112
It looks like the issue I'm having is a common one. I am having the problem with XBMCbuntu. The problem arises because the call to:

Code:
version = xbmc.getInfoLabel( "System.BuildVersion" )

returns:

Code:
11.0 git:Unkown

I fixed the problem by changing the getXBMCVersion function to the following.

Code:
def getXBMCVersion():
    log("", 3)
    version = xbmc.getInfoLabel( "System.BuildVersion" )
    log(version, 3)
    if version.find("-") -1:
        version = version[:version.find("-")]
    if version.find(" ") -1:
        version = version[:version.find(" ")]
    version = float(version)
    log(repr(version))
    return version
find quote
Post Reply