[jhbuild] desunify try/except/finally to be compatible with Python 2.4



commit e582e251103cfa75a08612663ee37205e860d74a
Author: Frédéric Péters <fpeters 0d be>
Date:   Sat May 23 11:09:17 2009 +0200

    desunify try/except/finally to be compatible with Python 2.4
---
 jhbuild/frontends/buildscript.py |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/jhbuild/frontends/buildscript.py b/jhbuild/frontends/buildscript.py
index a0f505a..0d91ffc 100644
--- a/jhbuild/frontends/buildscript.py
+++ b/jhbuild/frontends/buildscript.py
@@ -121,15 +121,16 @@ class BuildScript:
                 self.start_phase(module.name, phase)
                 error = None
                 try:
-                    error, altphases = module.run_phase(self, phase)
-                except SkipToPhase, e:
                     try:
-                        num_phase = build_phases.index(e.phase)
-                    except ValueError:
+                        error, altphases = module.run_phase(self, phase)
+                    except SkipToPhase, e:
+                        try:
+                            num_phase = build_phases.index(e.phase)
+                        except ValueError:
+                            break
+                        continue
+                    except SkipToEnd:
                         break
-                    continue
-                except SkipToEnd:
-                    break
                 finally:
                     self.end_phase(module.name, phase, error)
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]