From: Ian Jackson Date: Wed, 27 May 2009 23:35:01 +0000 (+0100) Subject: Fix crash bug in ship-aid KeyBasedSorter X-Git-Tag: 1.0~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.web-live.git;a=commitdiff_plain;h=b32d9afc646161e30761da7deb0841b11d01f1d6 Fix crash bug in ship-aid KeyBasedSorter --- diff --git a/yoweb-scrape b/yoweb-scrape index 08ebf8e..deb0594 100755 --- a/yoweb-scrape +++ b/yoweb-scrape @@ -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)