diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-12-03 12:15:04 -0500 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-03 12:15:04 -0500 |
commit | 57402ee727c8c1d8f5017534fb0f5e0b20aaaa5b (patch) | |
tree | be22ca8b5e16ce5c8607d6232405715b961a9b0a /bin/bitbake | |
parent | 44c325306e55336b7b416fd88b39874012a3f603 (diff) | |
download | openembedded-core-contrib-57402ee727c8c1d8f5017534fb0f5e0b20aaaa5b.tar.gz |
Error more pleasantly when trying to use python2.4
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'bin/bitbake')
-rwxr-xr-x | bin/bitbake | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/bin/bitbake b/bin/bitbake index 71e6385b10..fac2dc2a86 100755 --- a/bin/bitbake +++ b/bin/bitbake @@ -206,16 +206,17 @@ Default BBFILES are the .bb files in the current directory.""") ui = "knotty" try: - # Dynamically load the UI based on the ui name. Although we - # suggest a fixed set this allows you to have flexibility in which - # ones are available. - uimodule = __import__("bb.ui", fromlist = [ui]) - ui_init = getattr(uimodule, ui).init - except AttributeError: - print("FATAL: Invalid user interface '%s' specified. " % ui) - print("Valid interfaces are 'ncurses', 'depexp' or the default, 'knotty'.") - else: - return_value = ui_init(serverConnection.connection, serverConnection.events) + try: + # Dynamically load the UI based on the ui name. Although we + # suggest a fixed set this allows you to have flexibility in which + # ones are available. + uimodule = __import__("bb.ui", fromlist = [ui]) + ui_init = getattr(uimodule, ui).init + except AttributeError: + print("FATAL: Invalid user interface '%s' specified. " % ui) + print("Valid interfaces are 'ncurses', 'depexp' or the default, 'knotty'.") + else: + return_value = ui_init(serverConnection.connection, serverConnection.events) finally: serverConnection.terminate() |