koodaamo / tnefparse

a TNEF decoding library written in python, without external dependencies
GNU Lesser General Public License v3.0
49 stars 37 forks source link

Added a TNEFSignatureError class to allow the TNEF class to throw an exception #3

Closed bunzen closed 7 years ago

bunzen commented 11 years ago

Added a TNEFSignatureError class to allow the TNEF class to throw an exception, and not call sys.exit when used as a library.

cmdline.py is modified to try/except on this exception and exit with the previous behaviour.

petri commented 7 years ago

Thank you for the pull request, and my apologies for not handling this in due time.

Please see the recent changes to master; the TNEF class is now no longer exiting, it simply raises a ValueError. That is caught by the command-line that then shows the error and exits.

Which achieves pretty much the same as your PR. But thanks anyway.