From a9e5660fe65d73aaee6d996a91a43629db8d121c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 23 May 2009 17:36:36 +0200 Subject: [PATCH] skip phases that do not exist --- jhbuild/frontends/buildscript.py | 5 +++++ jhbuild/modtypes/__init__.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/jhbuild/frontends/buildscript.py b/jhbuild/frontends/buildscript.py index 0d91ffc1..01482e04 100644 --- a/jhbuild/frontends/buildscript.py +++ b/jhbuild/frontends/buildscript.py @@ -118,6 +118,11 @@ class BuildScript: except SkipToEnd: break + if not module.has_phase(phase): + # skip phases that do not exist, this can happen when + # phases were explicitely passed to this method. + continue + self.start_phase(module.name, phase) error = None try: diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py index 5af1374b..cd676541 100644 --- a/jhbuild/modtypes/__init__.py +++ b/jhbuild/modtypes/__init__.py @@ -168,6 +168,9 @@ class Package: else: return (None, None) + def has_phase(self, phase): + return hasattr(self, 'do_' + phase) + def check_build_policy(self, buildscript): if not buildscript.config.build_policy in ('updated', 'updated-deps'): return -- 2.11.4.GIT