diff options
-rw-r--r-- | meta/lib/oe/terminal.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/lib/oe/terminal.py b/meta/lib/oe/terminal.py index 52a891388a..9ca94f4fe2 100644 --- a/meta/lib/oe/terminal.py +++ b/meta/lib/oe/terminal.py @@ -218,11 +218,12 @@ def spawn(name, sh_cmd, title=None, env=None, d=None): def check_tmux_pane_size(tmux): import subprocess as sub + import re try: - p = sub.Popen('%s list-panes -F "#{?pane_active,#{pane_height},}"' % tmux, + p = sub.Popen('%s list-panes -F "#{pane_height} #{pane_active}"' % tmux, shell=True,stdout=sub.PIPE,stderr=sub.PIPE) out, err = p.communicate() - size = int(out.strip()) + size = int(re.sub(r'.*?(?P<height>\d+) 1.*',r'\g<height>', out, flags = re.DOTALL)) except OSError as exc: import errno if exc.errno == errno.ENOENT: |