From 6f194a1e7700997d3c61fa91c58c36da0f96e5c2 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
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-encode-error.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 gnu/packages/patches/pybugz-encode-error.patch

(limited to 'gnu/packages/patches/pybugz-encode-error.patch')

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')
-- 
cgit v1.2.3