From 97847cab97f6de716096afeaf78141ce4f546cfd Mon Sep 17 00:00:00 2001 From: ThiefMaster Date: Tue, 1 Apr 2014 20:22:21 +0200 Subject: [PATCH] Fix '-t in args' check fixes #77 --- tmuxp/pane.py | 2 +- tmuxp/window.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tmuxp/pane.py b/tmuxp/pane.py index 5186d57026..1dd405b7c5 100644 --- a/tmuxp/pane.py +++ b/tmuxp/pane.py @@ -67,7 +67,7 @@ def tmux(self, cmd, *args, **kwargs): :rtype: :class:`Server.tmux` """ - if not len([arg for arg in args if '-t' in arg]): + if not any(arg.startswith('-t') for arg in args): args = ('-t', self.get('pane_id')) + args return self.server.tmux(cmd, *args, **kwargs) diff --git a/tmuxp/window.py b/tmuxp/window.py index 93439d6edd..342560b1ab 100644 --- a/tmuxp/window.py +++ b/tmuxp/window.py @@ -76,7 +76,7 @@ def tmux(self, cmd, *args, **kwargs): :rtype: :class:`Server.tmux` """ - if not len([arg for arg in args if '-t' in str(arg)]): + if not any(arg.startswith('-t') for arg in args): args = ('-t', self.get('window_id')) + args return self.server.tmux(cmd, *args, **kwargs)