File: pybugz-encode-error.patch

package info (click to toggle)
guix 1.4.0-9
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 161,500 kB
  • sloc: lisp: 861,023; cpp: 10,741; javascript: 9,632; sh: 8,913; makefile: 951; ansic: 558; python: 129; sql: 33; sed: 16
file content (17 lines) | stat: -rw-r--r-- 665 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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')