1 |
commit: 96236b49a1da4bd32ac64ba97ab828e0a7b5e9e8 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 23 06:01:45 2011 +0000 |
4 |
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> |
5 |
CommitDate: Fri Dec 23 06:03:21 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/gentoolkit.git;a=commit;h=96236b49 |
7 |
|
8 |
Fix the term_width setting for the recent portage change, which is now returning 0 instead of -1. |
9 |
This should work for all portage versions. |
10 |
|
11 |
--- |
12 |
pym/gentoolkit/base.py | 2 +- |
13 |
1 files changed, 1 insertions(+), 1 deletions(-) |
14 |
|
15 |
diff --git a/pym/gentoolkit/base.py b/pym/gentoolkit/base.py |
16 |
index 832d902..3d662d5 100644 |
17 |
--- a/pym/gentoolkit/base.py |
18 |
+++ b/pym/gentoolkit/base.py |
19 |
@@ -40,7 +40,7 @@ def initialize_configuration(): |
20 |
|
21 |
# Get terminal size |
22 |
term_width = pp.output.get_term_size()[1] |
23 |
- if term_width == -1: |
24 |
+ if term_width < 1: |
25 |
# get_term_size() failed. Set a sane default width: |
26 |
term_width = 80 |
27 |
# Terminal size, minus a 1-char margin for text wrapping |