matteobertozzi/Hadoop — pull request #8 by jkahn (2013-08-02 17:20:45+00:00)
Title: Cleanups to exception handling regarding sequencefile versions

The exception handling for the user scenario of reading a non-SequenceFile (or a SequenceFile of the wrong version) is broken in a few places.

The break wasn't exposed by happy-path testing, but I personally (and inadvertently) executed a few unhappy-path cases (by attempting to read an empty file I thought was a SequenceFile.

These changes clean up that exception-handling quite a bit and make the exceptions more Pythonic. I do not believe they introduce any changes to working happy-path code.