mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-10 12:59:22 +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)
|
conf.registerPlugin('Topic', True)
|
||||||
|
|
||||||
|
|
||||||
class TopicFormat(registry.String):
|
class TopicFormat(registry.TemplatedString):
|
||||||
"Value must include $topic, otherwise the actual topic would be left out."
|
"Value must include $topic, otherwise the actual topic would be left out."
|
||||||
def setValue(self, v):
|
requiredTemplates = ['topic']
|
||||||
if '$topic' in v or '${topic}' in v:
|
|
||||||
registry.String.setValue(self, v)
|
|
||||||
else:
|
|
||||||
self.error()
|
|
||||||
|
|
||||||
Topic = conf.registerPlugin('Topic')
|
Topic = conf.registerPlugin('Topic')
|
||||||
conf.registerChannelValue(Topic, 'separator',
|
conf.registerChannelValue(Topic, 'separator',
|
||||||
|
Loading…
Reference in New Issue
Block a user