return True
def run(self):
- print(getattr(self, self.action + "_print")(**self.arguments))
+ print(self.description())
return getattr(self, self.action)(**self.arguments)
+ def description(self):
+ return getattr(self, self.action + "_print")(**self.arguments)
+
def command(self, command = "", **kwargs):
pass
else:
pass
- def wait(self, duration = 0, **kwargs):
+ def wait(self, duration = 0, music = None, **kwargs):
# FIXME: Make it stoppable
# http://stackoverflow.com/questions/29082268/python-time-sleep-vs-event-wait
- time.sleep(duration)
+ if music is None:
+ time.sleep(duration)
+ else:
+ # TODO
+ music.wait_end()
def command_print(self, command = "", **kwargs):
return "running command {}".format(command)