From 64f57ddf74e8ec945c2df33ce5e3a4a750dd89e7 Mon Sep 17 00:00:00 2001 From: Richard Darst Date: Thu, 9 Dec 2010 23:34:12 -0800 Subject: [PATCH] ircmeeting/meeting.py - ".none" extension prevents writing files Ignore-this: cb3a6066ac65f30924cfc87cce164921 - This provides a way to make a writer not write _any_ files. Examples of when this would be useful would be when you use the MediaWiki writer and upload directly instead of saving to a file. darcs-hash:20101210073412-82ea9-83b5efe12af594a5ff17d3268ef7b69c118c2197.gz --- doc/Manual.txt | 1 + ircmeeting/meeting.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/Manual.txt b/doc/Manual.txt index 080b0cb..843cdd2 100644 --- a/doc/Manual.txt +++ b/doc/Manual.txt @@ -491,6 +491,7 @@ along with extensions to use. For example, in '.mw':writers.MediaWiki, } +If an extension is ``.none`` the output will *not* be written to a file. This *can* be configured through supybot. To do this, set ``supybot.plugins.MeetBot.writer_map`` to a space-separated list of diff --git a/ircmeeting/meeting.py b/ircmeeting/meeting.py index a5b3fdd..c555fe0 100644 --- a/ircmeeting/meeting.py +++ b/ircmeeting/meeting.py @@ -216,8 +216,12 @@ class Config(object): 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) + pass + # ".none" or a single "." disable writing. + elif extension.lower() in (".none", "."): + pass + else: + self.writeToFile(text, filename) if hasattr(self, 'save_hook'): self.save_hook(realtime_update=realtime_update) return results