chiark / gitweb /
Fix crash bug in ship-aid KeyBasedSorter
[ypp-sc-tools.db-test.git] / yoweb-scrape
index 08ebf8eccf131819e41bdf6f007cc7b848d2dffe..deb0594a07f94b2c6288da74eec8671dc1af76c9 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)