Update Topic to use registry.TemplatedString

Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2009-10-15 22:35:17 -04:00
parent 035a9f2459
commit 5af38453a8
1 changed files with 2 additions and 6 deletions

View File

@ -39,13 +39,9 @@ def configure(advanced):
conf.registerPlugin('Topic', True)
class TopicFormat(registry.String):
class TopicFormat(registry.TemplatedString):
"Value must include $topic, otherwise the actual topic would be left out."
def setValue(self, v):
if '$topic' in v or '${topic}' in v:
registry.String.setValue(self, v)
else:
self.error()
requiredTemplates = ['topic']
Topic = conf.registerPlugin('Topic')
conf.registerChannelValue(Topic, 'separator',