From: Brian Dolbec Date: Fri, 23 Dec 2011 06:01:45 +0000 (-0800) Subject: Fix the term_width setting for the recent portage change, which is now returning... X-Git-Tag: gentoolkit-0.3.0.5~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=96236b49a1da4bd32ac64ba97ab828e0a7b5e9e8;p=gentoolkit.git 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. --- 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