From: Esko Kokkonen Date: Wed, 7 Sep 2011 13:33:11 +0000 (+0300) Subject: open_log(): Don't allow finally block to swallow function return X-Git-Url: http://git.itanic.dy.fi/?p=emerge-timer;a=commitdiff_plain;h=59462467b6fbb9e60c1ea27700adedcff12b1700 open_log(): Don't allow finally block to swallow function return If we run into the exception here, we don't need to return from this function but to exit the whole program anyway. --- diff --git a/emerge-timer.py b/emerge-timer.py index 6b8aac5..6bed7d0 100755 --- a/emerge-timer.py +++ b/emerge-timer.py @@ -203,8 +203,8 @@ def open_log(): except IOError as detail: print detail sys.exit(1) - finally: - return f + + return f