Rewrite try: except: finally: so it is python 2.4 friendly
This commit is contained in:
parent
aebd813c68
commit
25e07232ac
1 changed files with 12 additions and 11 deletions
23
wscript
23
wscript
|
@ -287,17 +287,18 @@ def build (bld):
|
||||||
pre = open (desktop + '.in')
|
pre = open (desktop + '.in')
|
||||||
after = open (folder + '/' + desktop, 'w')
|
after = open (folder + '/' + desktop, 'w')
|
||||||
try:
|
try:
|
||||||
for line in pre:
|
try:
|
||||||
if line != '':
|
for line in pre:
|
||||||
if line[0] == '_':
|
if line != '':
|
||||||
after.write (line[1:])
|
if line[0] == '_':
|
||||||
else:
|
after.write (line[1:])
|
||||||
after.write (line)
|
else:
|
||||||
after.close ()
|
after.write (line)
|
||||||
Utils.pprint ('BLUE', desktop + '.in -> ' + desktop)
|
after.close ()
|
||||||
install_files ('DATADIR', 'applications', folder + '/' + desktop)
|
Utils.pprint ('BLUE', desktop + '.in -> ' + desktop)
|
||||||
except:
|
install_files ('DATADIR', 'applications', folder + '/' + desktop)
|
||||||
Utils.pprint ('BLUE', 'File ' + desktop + ' not generated')
|
except:
|
||||||
|
Utils.pprint ('BLUE', 'File ' + desktop + ' not generated')
|
||||||
finally:
|
finally:
|
||||||
pre.close ()
|
pre.close ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue