From 6f194a1e7700997d3c61fa91c58c36da0f96e5c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 5 May 2014 17:12:55 +0200 Subject: gnu: pybugz: Add fixlet patches. * gnu/packages/python.scm (python2-pybugz)[source]: Add 'patches' field. * gnu/packages/patches/pybugz-encode-error.patch, gnu/packages/patches/pybugz-stty.patch: New files. * gnu-system.am (dist_patch_DATA): Add them. --- gnu/packages/patches/pybugz-stty.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 gnu/packages/patches/pybugz-stty.patch (limited to 'gnu/packages/patches/pybugz-stty.patch') diff --git a/gnu/packages/patches/pybugz-stty.patch b/gnu/packages/patches/pybugz-stty.patch new file mode 100644 index 0000000000..4453e9d027 --- /dev/null +++ b/gnu/packages/patches/pybugz-stty.patch @@ -0,0 +1,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 -- cgit v1.2.3