mikemaccana/python-docx — pull request #62 by JordanReiter (2014-02-14 18:31:28+00:00)
Title: Throw an exception if the docx file is invalid.

Right now if the file is a doc file (i.e. not a zip file) it throws a zipfile.BadZipFile exception, and if it's a zip file missing the right xml files it throws a KeyError. This catches both exceptions and throws a more useful exception that can be caught by a function/tool using python-docx.