chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-test.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
do not say how many aboard if we are not
[ypp-sc-tools.db-test.git]
/
yoweb-scrape
diff --git
a/yoweb-scrape
b/yoweb-scrape
index 08ebf8eccf131819e41bdf6f007cc7b848d2dffe..df8de47a0bce5d7b02fc750cd834fdf78dcba7ed 100755
(executable)
--- a/
yoweb-scrape
+++ b/
yoweb-scrape
@@
-1030,7
+1030,9
@@
def do_ship_aid(args, bu):
class KeyBasedSorter:
def compar_key_pa(self, pa):
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)
def lsort_pa(self, l):
l.sort(key = self.compar_key_pa)
@@
-1099,8
+1101,11
@@
def ship_aid_core(myself, track, displayer, kreader):
tbl_s = StringIO()
tbl = StandingsTable(tbl_s)
tbl_s = StringIO()
tbl = StandingsTable(tbl_s)
- tbl.headings(' %d aboard' % len(aboard),
- ' sorted by '+sort.desc())
+
+ if track.vesselname(): howmany = ' %d aboard' % len(aboard)
+ else: howmany = ''
+
+ tbl.headings(howmany, ' sorted by '+sort.desc())
for pa in aboard:
pi = pa.pirate_info()
for pa in aboard:
pi = pa.pirate_info()