File: string-exceptions.patch

package info (click to toggle)
epydoc 3.0.1%2Bdfsg-5
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,412 kB
  • ctags: 29,831
  • sloc: python: 14,318; makefile: 55; sh: 7
file content (18 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Description: Get rid of string exceptions.
#   One of the changes brought by Python 2.6 is the removal of string
#   exceptions.  A mass bug filing identified Epydoc as having potential
#   problems.  I later spot-checked all of the exceptions in the code, and I
#   believe this is the only one that we have to worry about.
# Bug-Debian: http://bugs.debian.org/585290
# Author: Kenneth J. Pronovici <pronovic@debian.org>
--- a/epydoc/apidoc.py
+++ b/epydoc/apidoc.py
@@ -1352,7 +1352,7 @@ class ClassDoc(NamespaceDoc):
               nothead=[s for s in nonemptyseqs if cand in s[1:]]
               if nothead: cand=None #reject candidate
               else: break
-          if not cand: raise "Inconsistent hierarchy"
+          if not cand: raise TypeError("Inconsistent hierarchy")
           res.append(cand)
           for seq in nonemptyseqs: # remove cand
               if seq[0] == cand: del seq[0]