Fix error reporting when there is a problem starting a UI

This commit is contained in:
Andrew Resch 2009-02-21 05:24:41 +00:00
parent be5cfd06e4
commit 0a51fc0c15

View file

@ -22,6 +22,7 @@
# Boston, MA 02110-1301, USA.
#
import sys
import deluge.configmanager
@ -61,7 +62,8 @@ class UI:
log.info("Starting ConsoleUI..")
from deluge.ui.console.main import ConsoleUI
ui = ConsoleUI(ui_args).run()
except ImportError:
except ImportError, e:
log.exception(e)
log.error("Unable to find the requested UI: %s. Please select a different UI with the '-u' option or alternatively use the '-s' option to select a different default UI.", selected_ui)
import sys
sys.exit(0)