File: string_exception.patch

package info (click to toggle)
python-scipy 0.7.2%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,500 kB
  • ctags: 36,081
  • sloc: cpp: 216,880; fortran: 76,016; python: 71,576; ansic: 62,118; makefile: 243; sh: 17
file content (29 lines) | stat: -rw-r--r-- 1,346 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Do not use string exceptions, not supported by Python 2.6
Origin: Debian

Index: python-scipy-0.7.2/scipy/weave/blitz_tools.py
===================================================================
--- python-scipy-0.7.2.orig/scipy/weave/blitz_tools.py	2010-06-07 12:48:10.000000000 +0000
+++ python-scipy-0.7.2/scipy/weave/blitz_tools.py	2010-06-07 12:47:44.000000000 +0000
@@ -32,7 +32,7 @@
     #    of time.  It also can cause core-dumps if the sizes of the inputs
     #    aren't compatible.
     if check_size and not size_check.check_expr(expr,local_dict,global_dict):
-        raise 'inputs failed to pass size check.'
+        raise Exception('inputs failed to pass size check.')
 
     # 2. try local cache
     try:
Index: python-scipy-0.7.2/scipy/weave/bytecodecompiler.py
===================================================================
--- python-scipy-0.7.2.orig/scipy/weave/bytecodecompiler.py	2010-06-07 12:48:10.000000000 +0000
+++ python-scipy-0.7.2/scipy/weave/bytecodecompiler.py	2010-06-07 12:48:02.000000000 +0000
@@ -237,7 +237,7 @@
         elif goto is None:
             return next # Normal
         else:
-            raise 'xx'
+            raise Exception('xx')
 
     symbols = { 0: 'less', 1: 'lesseq', 2: 'equal', 3: 'notequal',
                 4: 'greater', 5: 'greatereq', 6: 'in', 7: 'not in',