[Pki-devel] [PATCH] 57 On error, raise an Exception rather than use sys.exit - #562

Abhishek Koneru akoneru at redhat.com
Tue May 21 16:33:11 UTC 2013


On Mon, 2013-05-20 at 20:16 -0500, Endi Sukma Dewata wrote:
> On 5/16/2013 2:05 PM, Abhishek Koneru wrote:
> > Please review the patch which replaces all sys.exits() calls with raise
> > Exception statements, so that the caller can handle the exception.
> 
> Just one thing, in pkimanifest.py and pkiparser.py the original 
> exception is discarded and new exception is raised. In general it would 
> be better to re-throw the original exception, unless there's a specific 
> reason (e.g. to hide low level details).
> 
raising the same error.
> ACK with above issue fixed.
> 

Pushed to master.
> This is for future enhancement. In places where the sys.exit() was 
> removed, the code logs an error message, then it throws an exception 
> containing the same error message. It would be better to remove the 
> logging code from these locations, then log the error in the main program.
> 


--Abhishek




More information about the Pki-devel mailing list