[Python-apps-commits] r5366 - in packages/pythoncad/trunk/debian (3 files)

dktrkranz at users.alioth.debian.org dktrkranz at users.alioth.debian.org
Mon Jun 7 12:35:43 UTC 2010


    Date: Monday, June 7, 2010 @ 12:35:39
  Author: dktrkranz
Revision: 5366

Do not use string exceptions, not supported by Python 2.6

Added:
  packages/pythoncad/trunk/debian/patches/string_exceptions.patch
Modified:
  packages/pythoncad/trunk/debian/changelog
  packages/pythoncad/trunk/debian/patches/series

Modified: packages/pythoncad/trunk/debian/changelog
===================================================================
--- packages/pythoncad/trunk/debian/changelog	2010-06-07 12:29:57 UTC (rev 5365)
+++ packages/pythoncad/trunk/debian/changelog	2010-06-07 12:35:39 UTC (rev 5366)
@@ -1,10 +1,12 @@
 pythoncad (0.1.37.0-2) UNRELEASED; urgency=low
 
   * Switch to format 3.0 (quilt).
+  * debian/patches/string_exceptions.patch:
+    - Do not use string exceptions, not supported by Python 2.6.
   * debian/control:
     - Bump Standards-Version to 3.8.4, no changes required.
 
- -- Luca Falavigna <dktrkranz at debian.org>  Mon, 07 Jun 2010 14:29:14 +0200
+ -- Luca Falavigna <dktrkranz at debian.org>  Mon, 07 Jun 2010 12:35:11 +0000
 
 pythoncad (0.1.37.0-1) unstable; urgency=low
 

Modified: packages/pythoncad/trunk/debian/patches/series
===================================================================
--- packages/pythoncad/trunk/debian/patches/series	2010-06-07 12:29:57 UTC (rev 5365)
+++ packages/pythoncad/trunk/debian/patches/series	2010-06-07 12:35:39 UTC (rev 5366)
@@ -1 +1,2 @@
 image_path.patch
+string_exceptions.patch

Added: packages/pythoncad/trunk/debian/patches/string_exceptions.patch
===================================================================
--- packages/pythoncad/trunk/debian/patches/string_exceptions.patch	                        (rev 0)
+++ packages/pythoncad/trunk/debian/patches/string_exceptions.patch	2010-06-07 12:35:39 UTC (rev 5366)
@@ -0,0 +1,78 @@
+Description: Do not use string exceptions, not supported by Python 2.6
+Origin: Debian
+
+Index: pythoncad-0.1.37.0/PythonCAD/Generic/image.py
+===================================================================
+--- pythoncad-0.1.37.0.orig/PythonCAD/Generic/image.py	2010-06-07 12:32:52.000000000 +0000
++++ pythoncad-0.1.37.0/PythonCAD/Generic/image.py	2010-06-07 12:31:27.000000000 +0000
+@@ -836,7 +836,7 @@
+             simply a distinct point in the Layer if no nearby entities
+             were found.
+         """
+-        raise "Function getClosestPoint banned " 
++        raise Exception("Function getClosestPoint banned ")
+         _t=5.0
+         if 'tolerance' in kw:
+             _t=util.get_float(kw['tolerance'])
+Index: pythoncad-0.1.37.0/PythonCAD/Generic/tools.py
+===================================================================
+--- pythoncad-0.1.37.0.orig/PythonCAD/Generic/tools.py	2010-06-07 12:32:52.000000000 +0000
++++ pythoncad-0.1.37.0/PythonCAD/Generic/tools.py	2010-06-07 12:32:49.000000000 +0000
+@@ -920,17 +920,17 @@
+         return self.__FirstLine
+     def SetFirstLine(self,obj):
+         if obj==None:
+-            raise "None Object"        
++            raise Exception("None Object")
+         if not isinstance(obj,Segment):
+-            raise "Invalid object Need Segment or CLine"
++            raise Exception("Invalid object Need Segment or CLine")
+         self.__FirstLine=obj
+     def GetSecondLine(self):
+         return self.__SecondLine
+     def SetSecondtLine(self,obj):
+         if obj==None:
+-            raise "None Object"
++            raise Exception("None Object")
+         if not isinstance(obj,Segment):
+-            raise "Invalid object Need Segment or CLine"
++            raise Exception("Invalid object Need Segment or CLine")
+         self.__SecondLine=obj            
+     FirstLine=property(GetFirstLine,SetFirstLine,None,"Set first line object in the tool")
+     SecondLine=property(GetSecondLine,SetSecondtLine,None,"Set second line object in the tool")
+@@ -944,9 +944,9 @@
+             Set the first toolpoint
+         """
+         if point==None:
+-            raise "None Object"
++            raise Exception("None Object")
+         if not isinstance(point,Point):
+-            raise "Invalid object Need Point"
++            raise Exception("Invalid object Need Point")
+         self.__FirstPoint=point
+     def GetSecondPoint(self):
+         """
+@@ -958,9 +958,9 @@
+             Set the second toolpoint
+         """
+         if point==None:
+-            raise "None Object"
++            raise Exception("None Object")
+         if not isinstance(point,Point):
+-            raise "Invalid object Need Point"
++            raise Exception("Invalid object Need Point")
+         self.__SecondPoint=point
+     FirstPoint=property(GetFirstPoint,SetFirstPoint,None,"First line object in the tool")
+     SecondPoint=property(GetSecondPoint,SetSecondPoint,None,"Second line object in the tool")
+@@ -985,9 +985,9 @@
+             intersections._seg_seg_intersection(interPnt,self.__FirstLine,self.__SecondLine)
+         else:
+             if self.FirstLine==None:
+-                raise "tools.fillet.Create: First  obj is null"
++                raise Exception("tools.fillet.Create: First  obj is null")
+             if self.SecondLine==None:
+-                raise "tools.fillet.Create: Second  obj is null"
++                raise Exception("tools.fillet.Create: Second  obj is null")
+         if(len(interPnt)):
+             _active_layer = image.getActiveLayer() 
+             _s = image.getOption('LINE_STYLE')




More information about the Python-apps-commits mailing list