From 3fbcf6a3dab771de7a340f6b2c6a96c8485c9391 Mon Sep 17 00:00:00 2001 From: Dustin Kirkland Date: Wed, 21 Oct 2009 14:35:36 -0500 Subject: [PATCH] byobu-config: make byobu more python 2.5 friendly, by dropping the 'finally' clauses --- byobu-config | 20 ++++++++++---------- debian/changelog | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/byobu-config b/byobu-config index 25a14b1b..26e5f1d4 100755 --- a/byobu-config +++ b/byobu-config @@ -226,10 +226,10 @@ def appendwindow(win): f.write(win+"\n") except IOError: + f.close() return None - finally: - f.close() + f.close() def readwindows(): if not os.path.isfile(HOME+'/.'+PKG+'/windows'): @@ -255,10 +255,10 @@ def readwindows(): return li except IOError: + f.close() return None - finally: - f.close() + f.close() def readstatus(): status={} @@ -318,9 +318,9 @@ def writestatus(items): elif i[0] == 0: f.write(i[1]+"=0\n") except IOError: - return None - finally: f.close() + return None + f.close() def togglestatus(screen, size): itemlist=readstatus() @@ -357,9 +357,9 @@ def writewindows(winlist): else: f.write(win[1]) except IOError: - return None - finally: f.close() + return None + f.close() def defaultwindows(screen, size): winlist=readwindows() @@ -413,9 +413,9 @@ def appendtofile(p, s): try: f.write(s) except IOError: - return - finally: f.close() + return + f.close() return diff --git a/debian/changelog b/debian/changelog index 02fad1dc..fe8341f8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,6 +7,8 @@ byobu (2.39) unreleased; urgency=low screen-escape-keys (^a-@), or none (byobu-config), else (F9), LP: #450421 * debian/prerm: the for loop might not actually do anything, so make sure we do "something", like run "true", LP: #441788 + * byobu-config: make byobu more python 2.5 friendly, by dropping the + 'finally' clauses [ Derek Carter ] * rpm/byobu.spec: updated for Fedora 11