taoufix/tools — pull request #1 by nevik (2014-01-24 09:54:20+00:00)
Title: [animecheck] Support folders as arguments, handle missing CRC in filename

This patch adds two small features to the anime script that I added locally and thought might be useful for others:

* Support folders as arguments: Previously, the script could only take actual files as input arguments.
Expand it to handle directories by processing all files on the first
level within that directory (i.e. non-recursive) at the moment
(functionality for recursive handling is present but untested and
cannot be enabled via commandline option at this time).

* Catch missing CRC in filename: When the filename does not contain a CRC, the script would previously output a tuple instead of a normal message. Fix this to be better readable and uniform.

* Catch `IOError`s correctly: The catch statement for IO errors was using the tuple notation which does not work with current Python2. Fix this as recommended in the current Python manual.