]> git.immae.eu Git - perso/Immae/Projets/Python/MusicSampler.git/blobdiff - helpers/action.py
Add pirate example config.yml + description
[perso/Immae/Projets/Python/MusicSampler.git] / helpers / action.py
index 97873a0029d8e24e8a93b239174b305ab76bdd65..5afe43763c2f303ca8f6351ff14cf44e51287619 100644 (file)
@@ -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)