From d9524a1133dd3f8d4609cefc6f03f66c569db496 Mon Sep 17 00:00:00 2001 From: Angus Lees Date: Mon, 25 Aug 2014 12:48:02 +1000 Subject: [PATCH] Remove single occurrence of lost-exception warning Returning within a finally block can be surprising since the finally block will "hijack" the regular return flow. In this case, pylint is trying to warn us that the return-within-finally would discard the earlier caught exception. For this particular function we don't care that the exception is lost, so the existing code is correct but possibly confusing. Our options are: 1. Disable the lost-exception warning for this function 2. Rewrite the function to avoid return-within-finally This change takes approach (2), since the required change is trivial. This change also enables the corresponding pylint check now that the only offending case has been removed. Change-Id: If1706851b4bd67ebdbbdb3485984773598efdf7a --- .pylintrc | 1 - 1 file changed, 1 deletion(-) diff --git a/.pylintrc b/.pylintrc index c738c547c..d0775cbe6 100644 --- a/.pylintrc +++ b/.pylintrc @@ -48,7 +48,6 @@ disable= global-statement, global-variable-not-assigned, logging-not-lazy, - lost-exception, no-init, non-parent-init-called, pointless-string-statement,