X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=helpers%2Faction.py;h=5afe43763c2f303ca8f6351ff14cf44e51287619;hb=b86db9f1679c855c2d39a0b116f846d271271a2c;hp=97873a0029d8e24e8a93b239174b305ab76bdd65;hpb=ba9ea93a0f52178d24a606fddc2acc5dc85b7ff2;p=perso%2FImmae%2FProjets%2FPython%2FMusicSampler.git diff --git a/helpers/action.py b/helpers/action.py index 97873a0..5afe437 100644 --- a/helpers/action.py +++ b/helpers/action.py @@ -74,10 +74,14 @@ class Action: 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)