rbrito/tunesviewer — comment on commit fc98741880c5c27437241f6313edee700c054ee9
File: TunesViewer/usr/share/tunesviewer/downloadbox.py line 93
By rbrito:

> Are you sure ImportError is the only error that could occur?

I'm positive that it's not the only error that can occur. :)

> I set it to catch any error, since this code is "optional", just a gui effect, and I wouldn't want it to crash here due to any exception,

Yes, got that when I was reading the code (I'm still getting familiar
with it yet). For the distributions, we can simply add python-notify
or whatever and be done with it. Of course, not everybody will be
using prepackaged programs, but, for those, we at least trap that
exception.

> therefore any error is ignored.

The problem with catching every single exception is that it can mask
errors that should *not* be there. For instance, I suspect that one of
the problems that I am seeing may be due to an except catching too
general an exception and going ahead when it didn't.

In other words, I want things to break soon (if they would break
anyway) so that we can more precisely treat the issues that have with
the code.

Anyway, I think that I will soon be changing a load of those `print`'s
to use the `logging` module, which seems to be perfect to *not* spam
our console and, also, to put *more* logging, so that we can see what
is happening better:

http://docs.python.org/library/logging.html

BTW, thanks for the frequent updates. Would you mind to transfer your
tree here to github? It is more agile and better to exchange stuff
with people (for instance, you can merge some pull requests with the
simple GUI that they offer).

I am keeping here 3 branches:

* `master`: meant to track your tree
* `fixes`: some fixes that I want to merge soon
* `debian`: a more traditional debian packaging, which can be created
with `dpkg-buildpackage -us -uc` once the build-dependencies are
installed.

Well, that's it for now.

--
Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA
http://rb.doesntexist.org : Packages for LaTeX : algorithms.berlios.de
DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br