diff options
author | Richard Darst <rkd@zgib.net> | 2009-09-11 01:12:53 (GMT) |
---|---|---|
committer | Richard Darst <rkd@zgib.net> | 2009-09-11 01:12:53 (GMT) |
commit | 88141efa3e1d6f2ea4314463bc2246891440fca8 (patch) | |
tree | 7f18a818fc14b4b68530790e342ab06d2c8e01b8 | |
parent | 1837b354b33f48ad473bc0d7d0a4a9a98b2a5a18 (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.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |