[Bf-extensions-cvs] [3adbc8f] master: T35358: Fix for addons using raise without Exception object. TODO: Find better way to terminate addons and inform user. More py 2.x leftovers in startup/bl_operators/uvcalc_*!

CoDEmanX noreply at git.blender.org
Tue Nov 19 11:12:14 CET 2013


Commit: 3adbc8f30b229e7c9ff465183d5ab0acbbdf921a
Author: CoDEmanX
Date:   Tue Nov 19 11:11:51 2013 +0100
http://developer.blender.org/rBA3adbc8f30b229e7c9ff465183d5ab0acbbdf921a

T35358: Fix for addons using raise without Exception object. TODO: Find better way to terminate addons and inform user. More py 2.x leftovers in startup/bl_operators/uvcalc_*!

===================================================================

M	io_anim_bvh/import_bvh.py
M	io_scene_obj/import_obj.py

===================================================================

diff --git a/io_anim_bvh/import_bvh.py b/io_anim_bvh/import_bvh.py
index da4ece1..50ae4bd 100644
--- a/io_anim_bvh/import_bvh.py
+++ b/io_anim_bvh/import_bvh.py
@@ -110,7 +110,7 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
         #print 'Importing the BVH Hierarchy for:', file_path
         pass
     else:
-        raise 'ERROR: This is not a BVH file'
+        raise Exception("This is not a BVH file")
 
     bvh_nodes = {None: None}
     bvh_nodes_serial = [None]
@@ -274,7 +274,7 @@ def read_bvh(context, file_path, rotate_mode='XYZ', global_scale=1.0):
             else:
                 # allow this, see above
                 #if not bvh_node.children:
-                #	raise 'error, bvh node has no end and no children. bad file'
+                #	raise Exception("bvh node has no end and no children. bad file")
 
                 # Removed temp for now
                 rest_tail_world = Vector((0.0, 0.0, 0.0))
diff --git a/io_scene_obj/import_obj.py b/io_scene_obj/import_obj.py
index d51d62c..a295752 100644
--- a/io_scene_obj/import_obj.py
+++ b/io_scene_obj/import_obj.py
@@ -592,7 +592,7 @@ def create_mesh(new_objects,
 
     for i, face in enumerate(faces):
         if len(face[0]) < 2:
-            pass  # raise "bad face"
+            pass  # raise Exception("bad face")
         elif len(face[0]) == 2:
             if use_edges:
                 edges.append(face[0])



More information about the Bf-extensions-cvs mailing list