]> git.itanic.dy.fi Git - emerge-timer/commitdiff
open_log(): Don't allow finally block to swallow function return
authorEsko Kokkonen <esko.kokkonen@gmail.com>
Wed, 7 Sep 2011 13:33:11 +0000 (16:33 +0300)
committerEsko Kokkonen <esko.kokkonen@gmail.com>
Wed, 7 Sep 2011 13:33:11 +0000 (16:33 +0300)
If we run into the exception here, we don't need to return from this
function but to exit the whole program anyway.

emerge-timer.py

index 6b8aac5374bccb0244510dccbd1c584990b48454..6bed7d0bba80bac7419a57ef5ad150af9c8d8bac 100755 (executable)
@@ -203,8 +203,8 @@ def open_log():
     except IOError as detail:
         print detail
         sys.exit(1)
-    finally:
-        return f
+
+    return f