Open glennguy opened 4 years ago
Hey @andybotting just wondering your thoughts on this :)
Have you had errors with this previously, or is it just to make it easier for testing?
Either way, I think it looks OK. Defensive coding is always a good thing
Have you had errors with this previously, or is it just to make it easier for testing?
I've been checking the major version in a couple of cases recently, for either inputstream adaptive version checking or testing whether I can use more recent Kodi Python API calls.
What got me thinking about safeness is that I remember from a couple of years ago there was one of the xbmc.getInfoLabel
calls that would sometimes return an empty string the first time it was called, and my feeling was that it is this one - System.BuildVersion
. So just being a little defensive :)
This way we still end up with the same data type to operate on -> avoid type errors