From 88141efa3e1d6f2ea4314463bc2246891440fca8 Mon Sep 17 00:00:00 2001 From: Richard Darst Date: Fri, 11 Sep 2009 01:12:53 +0000 Subject: 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 --- 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) -- cgit v0.9.1