From 216b404a18c4ebf135a15842a50d1c2f18bb6fbd Mon Sep 17 00:00:00 2001 From: Kiooeht Date: Tue, 23 Aug 2011 03:58:16 -0700 Subject: [PATCH] Bug fix: Hopefully finally get Netsplit notification working --- dataobjs.py | 5 ++++- memos.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dataobjs.py b/dataobjs.py index 504293f..a452695 100644 --- a/dataobjs.py +++ b/dataobjs.py @@ -239,7 +239,10 @@ class PesterProfile(object): else: return "%s%s%s %s." % (syscolor.name(), self.colorhtml(), initials.pcf, self.initials(), initials.number, verb) def memonetsplitmsg(self, syscolor, initials): - return "Netsplit quits: %s" % (syscolor.name(), ", ".join(initials)) + if len(initials) <= 0: + return "Netsplit quits: None" % (syscolor.name()) + else: + return "Netsplit quits: %s" % (syscolor.name(), ", ".join(initials)) def memoopenmsg(self, syscolor, td, timeGrammar, verb, channel): (temporal, pcf, when) = (timeGrammar.temporal, timeGrammar.pcf, timeGrammar.when) timetext = timeDifference(td) diff --git a/memos.py b/memos.py index b504857..cbca0a9 100644 --- a/memos.py +++ b/memos.py @@ -958,7 +958,7 @@ class PesterMemo(PesterConvo): allinitials.append("%s%s%s" % (grammar.pcf, chum.initials(), grammar.number)) self.times[h].removeTime(t.getTime()) if update == "netsplit": - self.netsplit.extend(initials) + self.netsplit.extend(allinitials) else: msg = chum.memoclosemsg(systemColor, allinitials, self.mainwindow.theme["convo/text/closememo"]) self.textArea.append(convertTags(msg))