mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 14:24:39 -07:00
byobu-config: make byobu more python 2.5 friendly, by dropping the
'finally' clauses
This commit is contained in:
parent
79008190b0
commit
3fbcf6a3da
2 changed files with 12 additions and 10 deletions
20
byobu-config
20
byobu-config
|
@ -226,10 +226,10 @@ def appendwindow(win):
|
||||||
f.write(win+"\n")
|
f.write(win+"\n")
|
||||||
|
|
||||||
except IOError:
|
except IOError:
|
||||||
|
f.close()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
finally:
|
f.close()
|
||||||
f.close()
|
|
||||||
|
|
||||||
def readwindows():
|
def readwindows():
|
||||||
if not os.path.isfile(HOME+'/.'+PKG+'/windows'):
|
if not os.path.isfile(HOME+'/.'+PKG+'/windows'):
|
||||||
|
@ -255,10 +255,10 @@ def readwindows():
|
||||||
return li
|
return li
|
||||||
|
|
||||||
except IOError:
|
except IOError:
|
||||||
|
f.close()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
finally:
|
f.close()
|
||||||
f.close()
|
|
||||||
|
|
||||||
def readstatus():
|
def readstatus():
|
||||||
status={}
|
status={}
|
||||||
|
@ -318,9 +318,9 @@ def writestatus(items):
|
||||||
elif i[0] == 0:
|
elif i[0] == 0:
|
||||||
f.write(i[1]+"=0\n")
|
f.write(i[1]+"=0\n")
|
||||||
except IOError:
|
except IOError:
|
||||||
return None
|
|
||||||
finally:
|
|
||||||
f.close()
|
f.close()
|
||||||
|
return None
|
||||||
|
f.close()
|
||||||
|
|
||||||
def togglestatus(screen, size):
|
def togglestatus(screen, size):
|
||||||
itemlist=readstatus()
|
itemlist=readstatus()
|
||||||
|
@ -357,9 +357,9 @@ def writewindows(winlist):
|
||||||
else:
|
else:
|
||||||
f.write(win[1])
|
f.write(win[1])
|
||||||
except IOError:
|
except IOError:
|
||||||
return None
|
|
||||||
finally:
|
|
||||||
f.close()
|
f.close()
|
||||||
|
return None
|
||||||
|
f.close()
|
||||||
|
|
||||||
def defaultwindows(screen, size):
|
def defaultwindows(screen, size):
|
||||||
winlist=readwindows()
|
winlist=readwindows()
|
||||||
|
@ -413,9 +413,9 @@ def appendtofile(p, s):
|
||||||
try:
|
try:
|
||||||
f.write(s)
|
f.write(s)
|
||||||
except IOError:
|
except IOError:
|
||||||
return
|
|
||||||
finally:
|
|
||||||
f.close()
|
f.close()
|
||||||
|
return
|
||||||
|
f.close()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -7,6 +7,8 @@ byobu (2.39) unreleased; urgency=low
|
||||||
screen-escape-keys (^a-@), or none (byobu-config), else (F9), LP: #450421
|
screen-escape-keys (^a-@), or none (byobu-config), else (F9), LP: #450421
|
||||||
* debian/prerm: the for loop might not actually do anything, so make
|
* debian/prerm: the for loop might not actually do anything, so make
|
||||||
sure we do "something", like run "true", LP: #441788
|
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 ]
|
[ Derek Carter ]
|
||||||
* rpm/byobu.spec: updated for Fedora 11
|
* rpm/byobu.spec: updated for Fedora 11
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue