Replace result dictionary check with exception
Opened this issue · 3 comments
As (I think) Bill said:
billmeek/MythTVServicesAPI#3 (comment)
We should replace the check
if list(result.keys())[0] in ["Abort","Warning",]
with exception handling.
As far as I know, this check will never be true because the MythTVServicesAPI doesn't return a warning/abort value, but raises an exception.
Agreed. I think this was left over from the older version of the API.
Looks like there are only two parts of the code that have the check for Abort and Warning in the result. One I'm moving to __init__.py
as part of the improvements I'm adding to in the issue37 branch.
The other already has a RuntimeError exception check, so it seems safe to just pull that if list
block of code out completely.
I can address both in the issue37 branch and am planning to have code for your review by the end of the weekend.
Sounds good. I'll hold off doing anything about it then 👍
Thanks for your renewed effort. It's something that's been on the back burner of projects for years now... it's as good a time as any though!