Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Darst <rkd@zgib.net>2009-09-11 01:09:58 (GMT)
committer Richard Darst <rkd@zgib.net>2009-09-11 01:09:58 (GMT)
commit1837b354b33f48ad473bc0d7d0a4a9a98b2a5a18 (patch)
treeec7b654f66b760d6b3929661560df33d1a5c0109
parent4b9c47b1b7a9edf25c1f26c7ec367555ae95a7bc (diff)
Make .save() methods return the resultant text
- This allows us to make tests which check the output files from meetings, makeing it so that tests can actually perform useful tasks. darcs-hash:20090911010958-82ea9-64ef270bd49aff09880207f32f7b985cf469e808.gz
-rw-r--r--meeting.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/meeting.py b/meeting.py
index d0eaa9e..ef981d6 100644
--- a/meeting.py
+++ b/meeting.py
@@ -173,6 +173,7 @@ class Config(object):
# other methods break. That way, we have saved enough to
# replay.
writer_names = list(self.writers.keys())
+ results = { }
if '.log.txt' in writer_names:
writer_names.remove('.log.txt')
writer_names = ['.log.txt'] + writer_names
@@ -187,6 +188,7 @@ class Config(object):
):
continue
text = writer.format(extension)
+ results[extension] = text
# If the writer returns a string or unicode object, then
# we should write it to a filename with that extension.
# If it doesn't, then it's assumed that the write took
@@ -198,6 +200,7 @@ class Config(object):
self.writeToFile(text, rawname+extension)
if hasattr(self, 'save_hook'):
self.save_hook(realtime_update=realtime_update)
+ return results
def writeToFile(self, string, filename):
"""Write a given string to a file"""
# The reason we have this method just for this is to proxy
@@ -463,7 +466,7 @@ class Meeting(MeetingCommands, object):
"""Is the nick a chair?"""
return (nick == self.owner or nick in self.chairs)
def save(self, **kwargs):
- self.config.save(**kwargs)
+ return self.config.save(**kwargs)
# Primary enttry point for new lines in the log:
def addline(self, nick, line, time_=None):
"""This is the way to add lines to the Meeting object.