mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Update Topic to use registry.TemplatedString
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
035a9f2459
commit
5af38453a8
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user