summaryrefslogtreecommitdiff
path: root/portato/gui/windows/main.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2008-04-09 01:22:15 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2008-04-09 01:22:15 +0200
commit1d2d44b9162a9bcddc1a3b642c6f5038095b72c8 (patch)
tree178ad6b7794ae2d7c5520be298c0e3b7cfa68659 /portato/gui/windows/main.py
parentacf2acc79558471ff909e9edb11b0bef5e95f25c (diff)
downloadportato-1d2d44b9162a9bcddc1a3b642c6f5038095b72c8.tar.gz
portato-1d2d44b9162a9bcddc1a3b642c6f5038095b72c8.tar.bz2
portato-1d2d44b9162a9bcddc1a3b642c6f5038095b72c8.zip
Do something useful if an assertionerror is thrown during dep-resolution
Diffstat (limited to '')
-rw-r--r--portato/gui/windows/main.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/portato/gui/windows/main.py b/portato/gui/windows/main.py
index cde7461..14a0181 100644
--- a/portato/gui/windows/main.py
+++ b/portato/gui/windows/main.py
@@ -193,7 +193,7 @@ class PackageTable:
ftexts = []
for count, t in enumerate(texts):
- if not t.startswith(("http:", "ftp:")):
+ if not t.startswith(("http", "ftp")):
if count == 0:
error(_("The first homepage part does not start with 'http' or 'ftp'."))
ftexts.append(t)
@@ -225,9 +225,8 @@ class PackageTable:
def fill_dep_list(self):
- deptree = self.actual_package().get_dependencies()
store = self.depList.get_model()
-
+
def add (tree, it):
def get_icon (dep):
@@ -274,8 +273,15 @@ class PackageTable:
ndeps.sort(key = sort_key)
for dep in ndeps:
store.append(it, [get_icon(dep), dep.dep])
-
- add (deptree, None)
+
+ try:
+ deptree = self.actual_package().get_dependencies()
+ except AssertionError:
+ w = _("Can't display dependencies: This package has an unsupported dependency string.")
+ error(w)
+ store.append(None, [None, w])
+ else:
+ add(deptree, None)
def fill_use_list(self):