From 96236b49a1da4bd32ac64ba97ab828e0a7b5e9e8 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Thu, 22 Dec 2011 22:01:45 -0800 Subject: [PATCH] Fix the term_width setting for the recent portage change, which is now returning 0 instead of -1. This should work for all portage versions. --- pym/gentoolkit/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/gentoolkit/base.py b/pym/gentoolkit/base.py index 832d902..3d662d5 100644 --- a/pym/gentoolkit/base.py +++ b/pym/gentoolkit/base.py @@ -40,7 +40,7 @@ def initialize_configuration(): # Get terminal size term_width = pp.output.get_term_size()[1] - if term_width == -1: + if term_width < 1: # get_term_size() failed. Set a sane default width: term_width = 80 # Terminal size, minus a 1-char margin for text wrapping -- 2.26.2