py 2.3 compat for lightwave_import and wizard_curve2tree
[blender.git] / release / scripts / wizard_curve2tree.py
index eb27f1ca0f566fd704918116a9346f513e2908bd..84b2cc76132d762794e0b16cb6c5aadb6c5a6d21 100644 (file)
@@ -266,7 +266,9 @@ class tree:
                                brch.calcData()
                        
                # Sort from big to small, so big branches get priority
-               self.branches_all.sort( key = lambda brch: -brch.bpoints[0].radius )
+               # Py 2.3 dosnt have keywords in sort
+               try:    self.branches_all.sort( key = lambda brch: -brch.bpoints[0].radius )
+               except: self.branches_all.sort( lambda brch_a, brch_b: cmp(brch_b.bpoints[0].radius, brch_a.bpoints[0].radius) )
        
        
        def closestBranchPt(self, co):