[Python-modules-commits] r13488 - in packages/soya/trunk/debian (3 files)

bernat at users.alioth.debian.org bernat at users.alioth.debian.org
Fri Jun 18 19:23:32 UTC 2010


    Date: Friday, June 18, 2010 @ 19:23:30
  Author: bernat
Revision: 13488

Python 2.6 does not support string exceptions any more. Add a patch to
encapsulate them into exception instances. Closes: #585329.

Added:
  packages/soya/trunk/debian/patches/no-string-exceptions
Modified:
  packages/soya/trunk/debian/changelog
  packages/soya/trunk/debian/patches/series

Modified: packages/soya/trunk/debian/changelog
===================================================================
--- packages/soya/trunk/debian/changelog	2010-06-18 18:29:22 UTC (rev 13487)
+++ packages/soya/trunk/debian/changelog	2010-06-18 19:23:30 UTC (rev 13488)
@@ -1,3 +1,10 @@
+soya (0.15~rc1-3) unstable; urgency=low
+
+  * Python 2.6 does not support string exceptions any more. Add a patch to
+    encapsulate them into exception instances. Closes: #585329.
+
+ -- Vincent Bernat <bernat at debian.org>  Fri, 18 Jun 2010 21:15:52 +0200
+
 soya (0.15~rc1-2) unstable; urgency=low
 
   * Fix some null characters appearing in editor/world.py.

Added: packages/soya/trunk/debian/patches/no-string-exceptions
===================================================================
--- packages/soya/trunk/debian/patches/no-string-exceptions	                        (rev 0)
+++ packages/soya/trunk/debian/patches/no-string-exceptions	2010-06-18 19:23:30 UTC (rev 13488)
@@ -0,0 +1,37 @@
+Encapsulate string exceptions into some regular exception instance.
+
+diff --git a/ark2soya.py b/ark2soya.py
+index 26d7ec9..041f6b6 100644
+--- a/ark2soya.py
++++ b/ark2soya.py
+@@ -75,7 +75,7 @@ def parse_ark(ark):
+ 		for mesh in submodel["Meshes"]:
+ 			if   mesh["Type"] == "Triangles": nbv = 3
+ 			elif mesh["Type"] == "Quad"     : nbv = 4
+-			else: raise "UnknownVertexNumber"
++			else: raise ValueError("UnknownVertexNumber")
+ 			
+ 			material = soya.Material.get(mesh["Material"])
+ 			
+diff --git a/pudding/ext/svgelements.py b/pudding/ext/svgelements.py
+index 63fcd03..da95850 100644
+--- a/pudding/ext/svgelements.py
++++ b/pudding/ext/svgelements.py
+@@ -25,7 +25,7 @@ try:
+ 	except ImportError:
+ 		from xml.etree import ElementTree
+ except ImportError:
+-	raise "You need elementtree from http://effbot.org/zone/element-index.htm"
++	raise ImportError("You need elementtree from http://effbot.org/zone/element-index.htm")
+ 
+ try:
+ 	import cairo
+@@ -94,7 +94,7 @@ def find_svg(fn):
+ 		if os.path.isfile(test_file):
+ 			return test_file
+ 	
+-	raise "cannot find %s" % fn
++	raise OSError("cannot find %s" % fn)
+ 
+ def find_img(fn):
+ 	""" locate an image file in the soya path """

Modified: packages/soya/trunk/debian/patches/series
===================================================================
--- packages/soya/trunk/debian/patches/series	2010-06-18 18:29:22 UTC (rev 13487)
+++ packages/soya/trunk/debian/patches/series	2010-06-18 19:23:30 UTC (rev 13488)
@@ -6,3 +6,4 @@
 null-characters-world-py
 # enable_pyrex
 # elementtree
+no-string-exceptions




More information about the Python-modules-commits mailing list