chiark / gitweb /
Fix crash bug in ship-aid KeyBasedSorter
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 27 May 2009 23:35:01 +0000 (00:35 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 27 May 2009 23:35:01 +0000 (00:35 +0100)
yoweb-scrape

index 08ebf8e..deb0594 100755 (executable)
@@ -1030,7 +1030,9 @@ def do_ship_aid(args, bu):
 
 class KeyBasedSorter:
        def compar_key_pa(self, pa):
-               return self.compar_key(pa.pirate_info())
+               pi = pa.pirate_info()
+               if pi is None: return None
+               return self.compar_key(pi)
        def lsort_pa(self, l):
                l.sort(key = self.compar_key_pa)