]> spindle.queued.net Git - midori/commitdiff
Rewrite try: except: finally: so it is python 2.4 friendly
authorChristian Dywan <christian@twotoasts.de>
Mon, 5 Jan 2009 21:08:52 +0000 (22:08 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 5 Jan 2009 21:08:52 +0000 (22:08 +0100)
wscript

diff --git a/wscript b/wscript
index 73756c0a811917953c0fb4c8195375be46f9f8aa..8acddcc25399a2c73b9afd56b334cde202442f36 100644 (file)
--- a/wscript
+++ b/wscript
@@ -287,17 +287,18 @@ def build (bld):
         pre = open (desktop + '.in')
         after = open (folder + '/' + desktop, 'w')
         try:
-            for line in pre:
-                if line != '':
-                    if line[0] == '_':
-                        after.write (line[1:])
-                    else:
-                        after.write (line)
-            after.close ()
-            Utils.pprint ('BLUE', desktop + '.in -> ' + desktop)
-            install_files ('DATADIR', 'applications', folder + '/' + desktop)
-        except:
-            Utils.pprint ('BLUE', 'File ' + desktop + ' not generated')
+            try:
+                for line in pre:
+                    if line != '':
+                        if line[0] == '_':
+                            after.write (line[1:])
+                        else:
+                            after.write (line)
+                after.close ()
+                Utils.pprint ('BLUE', desktop + '.in -> ' + desktop)
+                install_files ('DATADIR', 'applications', folder + '/' + desktop)
+            except:
+                Utils.pprint ('BLUE', 'File ' + desktop + ' not generated')
         finally:
             pre.close ()