summaryrefslogtreecommitdiff
path: root/portato/gui/__init__.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2009-01-15 13:29:30 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2009-01-15 13:29:30 +0100
commit199a2ec3b17bc59e6854db2a96ed223d21803ce7 (patch)
treeafe43205298d4df838087dc778fd68fa9b6b8409 /portato/gui/__init__.py
parent2aa260c13d2b23141a6644af6b27da243d1f3641 (diff)
downloadportato-199a2ec3b17bc59e6854db2a96ed223d21803ce7.tar.gz
portato-199a2ec3b17bc59e6854db2a96ed223d21803ce7.tar.bz2
portato-199a2ec3b17bc59e6854db2a96ed223d21803ce7.zip
Add prerequisite checking before startup
Diffstat (limited to 'portato/gui/__init__.py')
-rw-r--r--portato/gui/__init__.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/portato/gui/__init__.py b/portato/gui/__init__.py
index 5bbe4c8..e3f1172 100644
--- a/portato/gui/__init__.py
+++ b/portato/gui/__init__.py
@@ -3,7 +3,7 @@
# File: portato/gui/__init__.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
@@ -12,8 +12,10 @@
from __future__ import absolute_import
-from .. import get_listener
+from ..helper import error
from .exception_handling import register_ex_handler
+from .exceptions import PreReqError
+from .dialogs import prereq_error_dialog
def run ():
from .windows.splash import SplashScreen
@@ -23,6 +25,11 @@ def run ():
s.show()
from .windows.main import MainWindow
- m = MainWindow(s)
- s.hide()
- m.main()
+ try:
+ m = MainWindow(s)
+ s.hide()
+ m.main()
+ except PreReqError, e:
+ error("Prerequisite not matched. Aborting.")
+ prereq_error_dialog(e)
+ s.hide()