This is just to reduce the visual noise of all the
CommandResult(""). Nothing really uses the optional
tag part, but it's conceivably useful so let's not
rip it out just yet.
Signed-off-by: John Spray <john.spray@redhat.com>
"""
Use with MgrModule.send_command
"""
- def __init__(self, tag):
+ def __init__(self, tag=None):
self.ev = threading.Event()
self.outs = ""
self.outb = ""
# This is just a convenience for notifications from
# C++ land, to avoid passing addresses around in messages.
- self.tag = tag
+ self.tag = tag if tag else ""
def complete(self, r, outb, outs):
self.r = r