]> git.0d.be Git - django-panik-nonstop.git/commitdiff
stamina: print "interrupting nonstop" message only when current slot is nonstop
authorFrédéric Péters <fpeters@0d.be>
Tue, 14 Jul 2020 10:03:47 +0000 (12:03 +0200)
committerFrédéric Péters <fpeters@0d.be>
Tue, 14 Jul 2020 10:03:47 +0000 (12:03 +0200)
nonstop/management/commands/stamina.py

index 6b7533a1001d897d6101e05970b4472be4c0b96e..13b772975b9d909184ec48b9a8b0c6e2462d9197 100644 (file)
@@ -318,7 +318,7 @@ class Command(BaseCommand):
                 if isinstance(current_slot, Nonstop) and isinstance(expected_slot, Nonstop):
                     # ask for a softstop, i.e. finish the track then switch.
                     self.softstop = True
-                else:
+                elif isinstance(current_slot, Nonstop):
                     # interrupt nonstop
                     print('interrupting nonstop', file=sys.stderr)
                     self.play_task.cancel()