From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 76EBC13800E for ; Fri, 27 Jul 2012 22:47:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A80BFE0774; Fri, 27 Jul 2012 22:47:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 74C93E0774 for ; Fri, 27 Jul 2012 22:47:01 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AA4DB1B406A for ; Fri, 27 Jul 2012 22:47:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 69DE5E5436 for ; Fri, 27 Jul 2012 22:46:59 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1343429207.0c46edc9290a459f693c12fbb34a2f361e40e168.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/output.py X-VCS-Directories: pym/portage/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 0c46edc9290a459f693c12fbb34a2f361e40e168 X-VCS-Branch: master Date: Fri, 27 Jul 2012 22:46:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: acdd3dff-1026-4d2d-924b-f478371c184f X-Archives-Hash: d820f28790c44e3e2a4c875ba4febfa2 commit: 0c46edc9290a459f693c12fbb34a2f361e40e168 Author: Zac Medico gentoo org> AuthorDate: Fri Jul 27 22:46:47 2012 +0000 Commit: Zac Medico gentoo org> CommitDate: Fri Jul 27 22:46:47 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0c46edc9 get_term_size: handle missing stty command --- pym/portage/output.py | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pym/portage/output.py b/pym/portage/output.py index 5129db7..e44375e 100644 --- a/pym/portage/output.py +++ b/pym/portage/output.py @@ -450,8 +450,15 @@ def get_term_size(fd=None): except ImportError: pass - proc = subprocess.Popen(["stty", "size"], - stdout=subprocess.PIPE, stderr=fd) + try: + proc = subprocess.Popen(["stty", "size"], + stdout=subprocess.PIPE, stderr=fd) + except EnvironmentError as e: + if e.errno != errno.ENOENT: + raise + # stty command not found + return (0, 0) + out = _unicode_decode(proc.communicate()[0]) if proc.wait() == os.EX_OK: out = out.split()