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:12:53 (GMT)
committer Richard Darst <rkd@zgib.net>2009-09-11 01:12:53 (GMT)
commit88141efa3e1d6f2ea4314463bc2246891440fca8 (patch)
tree7f18a818fc14b4b68530790e342ab06d2c8e01b8
parent1837b354b33f48ad473bc0d7d0a4a9a98b2a5a18 (diff)
add dontSave config variable test in .save()
- If dontSave is True, then do not write any physical files to disk. The output is only returned. This also helps tests run quickly and without too many side effects. darcs-hash:20090911011253-82ea9-6c9eae67aef7f8549fc374344fafcf2794b391e7.gz
-rw-r--r--meeting.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/meeting.py b/meeting.py
index ef981d6..b08c469 100644
--- a/meeting.py
+++ b/meeting.py
@@ -197,6 +197,9 @@ class Config(object):
if isinstance(text, unicode):
text = self.enc(text)
if isinstance(text, (str, unicode)):
+ # Have a way to override saving, so no disk files are written.
+ if getattr(self, "dontSave", False):
+ continue
self.writeToFile(text, rawname+extension)
if hasattr(self, 'save_hook'):
self.save_hook(realtime_update=realtime_update)