return self._vessel
def aboard(self):
# returns a list of PirateAboard sorted by name
+ if self._v is None: return []
return [ self._v[pn]
for pn in sorted(self._v.keys())
if not pn.startswith('#') ]
max_myself_age=3600):
if len(args) != 1: bu('this action takes only chat log filename')
logfn = args[0]
- logfn_re = '(?:.*/)?([A-Z][a-z]+)_([a-z]+)_chat-log-\\w+$'
+ logfn_re = '(?:.*/)?([A-Z][a-z]+)_([a-z]+)_'
match = regexp.match(logfn_re, logfn)
- if not match: bu('chat log filename is not in default format')
+ if not match: bu('chat log filename is not in expected format')
(pirate, ocean) = match.groups()
fetcher.default_ocean(ocean)
s = "%s" % track.myname()
vn = track.vessel()
- if vn is None:
- s += " not on a vessel?!"
- else:
- s += " on board the %s at %s\n" % (
- vn, time.strftime("%Y-%m-%d %H:%M:%S"))
+ if vn is None: s += " not on a vessel?!"
+ else: s += " on board the %s" % vn
+ s += " at %s\n" % time.strftime("%Y-%m-%d %H:%M:%S")
tbl = StandingsTable()
tbl.headings()