error message when an addon was missing register/unregister functions whasnt very...
authorCampbell Barton <ideasman42@gmail.com>
Wed, 22 Aug 2012 10:03:37 +0000 (10:03 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 22 Aug 2012 10:03:37 +0000 (10:03 +0000)
release/scripts/modules/addon_utils.py

index 02d9cd2d1c65ba3f9b0c50d6523ab6df6b98d700..433d9024e0ac2996caff4387f7f646b2634903d9 100644 (file)
@@ -275,6 +275,7 @@ def enable(module_name, default_set=True, persistent=False):
     try:
         mod.register()
     except:
+        print("Exception in module register(): %r" % getattr(mod, "__file__", module_name))
         handle_error()
         del sys.modules[module_name]
         return None
@@ -316,6 +317,7 @@ def disable(module_name, default_set=True):
         try:
             mod.unregister()
         except:
+            print("Exception in module unregister(): %r" % getattr(mod, "__file__", module_name))
             import traceback
             traceback.print_exc()
     else: