Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code raises Exceptions instead of its subclasses #19

Open
Tomin1 opened this issue Jan 28, 2016 · 3 comments
Open

Code raises Exceptions instead of its subclasses #19

Tomin1 opened this issue Jan 28, 2016 · 3 comments

Comments

@Tomin1
Copy link

Tomin1 commented Jan 28, 2016

The code always raises Exception instead of one of its subclasses. That is not very good idea because it makes writing good unit tests hard. I fixed one more error with the unit tests on commit a163e92 that was not caught by the nosetests because the test expected any error (and got TypeError in this case). Assigning proper (or even custom) Exception subclasses would make the testing a lot more solid.

@enyone
Copy link
Owner

enyone commented Jan 30, 2016

It's always a sin to use "bare" Exception. At least as bad as excepting one ;)
You are more than welcome to fix this informality.

@Tomin1
Copy link
Author

Tomin1 commented Jan 30, 2016

Thanks. I'll look into that when I have some spare time.

Btw. I could not play videos with Kodi plugin. I think Elisa made some changes to the way videos are downloaded. But that's another issue and maybe not even on this repository.

@Tomin1
Copy link
Author

Tomin1 commented Jan 31, 2016

I did the simples thing to do and created a very simple custom exception because there isn't really any Python Built-in exception that fits. I think there are still a some things that I might change like expecting Exception in elisaviihde.py code. The work I've done is in branch Tomin1:new_exceptions (especially commit ff4c636) and I'd like to hear any comments on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants