From 2f257a1ee709d31ab17cc10d50f235c587146d9f Mon Sep 17 00:00:00 2001 From: Daniel Weschke Date: Thu, 8 Apr 2021 14:42:49 +0200 Subject: [PATCH] fix button command execution without altative command --- controldeck.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/controldeck.py b/controldeck.py index 0bed1a0..9176f91 100644 --- a/controldeck.py +++ b/controldeck.py @@ -145,7 +145,10 @@ class Button(Div): def click(self, msg): self.state = process(self.state_command) if search(self.state_pattern, self.state): - process_shell(self.command_alt) + if self.command_alt is None: + process_shell(self.command) + else: + process_shell(self.command_alt) if self.image_alt: self.components[0] = self.image_alt_element elif self.icon_alt: