all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob 4453e9d0270624521999f6f98610a12ff78e6ce7 667 bytes (raw)
name: packages/patches/pybugz-stty.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
 
Gracefully deal with 'stty size' failures.
Submitted upstream.

--- pybugz-0.6.11/bugz.py	2006-09-02 14:35:37.000000000 +0200
+++ pybugz-0.6.11/bugz.py	2014-05-05 15:17:03.000000000 +0200
@@ -288,7 +288,12 @@ def get_cols():
     stty = which('stty')
     if stty:
         row_cols = commands.getoutput("%s size" % stty)
-        rows, cols = map(int, row_cols.split())
+        try:
+            rows, cols = map(int, row_cols.split())
+        except:
+            # In some cases 'stty size' will just fail with
+            # "Inappropriate ioctl for device".
+            cols = DEFAULT_NUM_COLS
         return cols
     else:
         return DEFAULT_NUM_COLS

debug log:

solving 4453e9d0270624521999f6f98610a12ff78e6ce7 ...
found 4453e9d0270624521999f6f98610a12ff78e6ce7 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.