aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-05-05 17:12:55 +0200
committerLudovic Courtès <ludo@gnu.org>2014-05-05 17:12:55 +0200
commit6f194a1e7700997d3c61fa91c58c36da0f96e5c2 (patch)
tree9989a6b6f28381a8b05059a71bfc7783d3d054f3 /gnu/packages/patches
parent515eba4543f658799b1e11d187fa599d0a9a0dce (diff)
downloadguix-6f194a1e7700997d3c61fa91c58c36da0f96e5c2.tar
guix-6f194a1e7700997d3c61fa91c58c36da0f96e5c2.tar.gz
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.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/pybugz-encode-error.patch17
-rw-r--r--gnu/packages/patches/pybugz-stty.patch19
2 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/pybugz-encode-error.patch b/gnu/packages/patches/pybugz-encode-error.patch
new file mode 100644
index 0000000000..ab78bf84b3
--- /dev/null
+++ b/gnu/packages/patches/pybugz-encode-error.patch
@@ -0,0 +1,17 @@
+In case of 'AttributeError', 'value' is None, so do not try to
+access it.
+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 16:02:20.000000000 +0200
+@@ -1249,9 +1254,9 @@ class PrettyBugz(Bugz):
+ for field, name in FIELDS + MORE_FIELDS:
+ try:
+ value = result.find('//%s' % field).text
++ print '%-12s: %s' % (name, value.encode(self.enc))
+ except AttributeError:
+ continue
+- print '%-12s: %s' % (name, value.encode(self.enc))
+
+ # Print out the cc'ed people
+ cced = result.findall('.//cc')
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