aboutsummaryrefslogtreecommitdiff
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
href='/guix/commit/gnu/packages/disk.scm?id=2c3a0f248b5ce35da3d502f0cce555610d440772'>gnu: lf: Update to 25...Chadwain Holness 2021-09-04gnu: gparted: Update to 1.3.1....Tobias Geerinckx-Rice 2021-07-27gnu: duperemove: Update to 0.11.3....Leo Famulari 2021-07-29gnu: web: Move libyaml and libcyaml to (gnu packages serialization)....Maxim Cournoyer 2021-06-19gnu: Add duc....Brice Waegeneire 2021-06-10gnu: gptfdisk: Update to 1.0.8....Tobias Geerinckx-Rice 2021-06-05gnu: gparted: Update to 1.3.0....Brendan Tildesley 2021-05-23gnu: hddtemp: Update to 0.4.3....Tobias Geerinckx-Rice 2021-05-22gnu: libblockdev: Prepare for GLib 2.58....Marius Bakke 2021-05-13gnu: xfe: Update to 1.44 and adjust potfiles....Raghav Gururajan 2021-05-13gnu: Add bmaptools....Mathieu Othacehe 2021-04-28gnu: Add mmc-utils....Leo Famulari 2021-04-23gnu: sdparm: Update to 1.12....Tobias Geerinckx-Rice 2021-04-10gnu: gpart: Fix typo in description....Tobias Geerinckx-Rice 2021-03-27gnu: Add gpart....Tobias Geerinckx-Rice 2021-03-27gnu: gptfdisk: Update to 1.0.7....Tobias Geerinckx-Rice 2021-03-24gnu: ddrescue: Support cross compiling....Efraim Flashner 2021-03-11gnu: memkind: Remove duplicate COPYING file....Tobias Geerinckx-Rice 2021-03-11gnu: memkind: Update to 1.11.0....Tobias Geerinckx-Rice 2021-02-15gnu: dosfstools: Fetch sources from git....Tobias Geerinckx-Rice 2021-02-15gnu: dosfstools: Update to 4.2....Tobias Geerinckx-Rice 2021-02-11gnu: parted: Update to 3.4....Léo Le Bouter 2021-01-26gnu: gparted: Update to 1.2.0....Michael Rohleder 2021-01-14gnu: gptfdisk: Update to 1.0.6....Tobias Geerinckx-Rice 2021-01-11gnu: libblockdev: Update to 2.25....Tobias Geerinckx-Rice