2011-01-01, 19:32
Hey, I've cleaned your script up a little.
I've removed the redundant config checking code mostly. Both classes now wrap an Xbmc object, which serves as a universal class to build the configuration and check whether the XBMC instance can be reached.
I've refactored the config processing as well, and should be easier now.
I now also throws custom exceptions.
https://gist.github.com/761851
GitHub's GISTs don't show diffs by defaults, but there are userscripts to do this for you. Alternatively you can just use a decent diff program or get the GIST's git repository.
Oh... and I should note that this is completely untested, it may even have syntax errors
I've removed the redundant config checking code mostly. Both classes now wrap an Xbmc object, which serves as a universal class to build the configuration and check whether the XBMC instance can be reached.
I've refactored the config processing as well, and should be easier now.
I now also throws custom exceptions.
https://gist.github.com/761851
GitHub's GISTs don't show diffs by defaults, but there are userscripts to do this for you. Alternatively you can just use a decent diff program or get the GIST's git repository.
Oh... and I should note that this is completely untested, it may even have syntax errors