Commit: 350c9d09e996fdb4016ff8bbac1ad3e70cc251b3
Author: Campbell Barton
Date:   Wed Mar 22 12:46:11 2017 +1100
Branches: app-templates
https://developer.blender.org/rB350c9d09e996fdb4016ff8bbac1ad3e70cc251b3

Cleanup: style

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

M       release/scripts/modules/bl_app_override/__init__.py
M       release/scripts/modules/bl_app_override/helpers.py

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

diff --git a/release/scripts/modules/bl_app_override/__init__.py 
b/release/scripts/modules/bl_app_override/__init__.py
index 396ebf78a2..efd7c525e6 100644
--- a/release/scripts/modules/bl_app_override/__init__.py
+++ b/release/scripts/modules/bl_app_override/__init__.py
@@ -146,7 +146,6 @@ def ui_draw_filter_register(
         def operator(*args, **kw):
             return super().operator(*args, **kw)
 
-
     def draw_override(func_orig, self_real, context):
         # simple, no wrapping
         # return func_orig(self_wrap, context)
diff --git a/release/scripts/modules/bl_app_override/helpers.py 
b/release/scripts/modules/bl_app_override/helpers.py
index f60fb271a1..ccce200c21 100644
--- a/release/scripts/modules/bl_app_override/helpers.py
+++ b/release/scripts/modules/bl_app_override/helpers.py
@@ -21,6 +21,7 @@
 # -----------------------------------------------------------------------------
 # AppOverrideState
 
+
 class AppOverrideState:
     """
     Utility class to encapsulate overriding the application state,
@@ -124,7 +125,7 @@ class AppOverrideState:
             unregister_class(cls)
 
     def _teardown_classes(self):
-        assert(len(self._class_store) != 0)
+        assert(self._class_store is not None)
 
         from bpy.utils import register_class
         for cls in self._class_store:
@@ -152,7 +153,6 @@ class AppOverrideState:
         )
         self._ui_ignore_store = None
 
-
     def _setup_addons(self):
         import sys
         import os
@@ -180,7 +180,8 @@ class AppOverrideState:
 
         sys_path = self._addon_store["sys_path"]
         for path in sys_path:
-            # should always succeed, but if not its no problem
+            # should always succeed, but if not it doesn't matter
+            # (someone else was changing the sys.path), ignore!
             try:
                 sys.path.remove(path)
             except:
@@ -200,14 +201,14 @@ class AppOverrideState:
 
         if any((self.addon_paths,
                 self.addons,
-        )):
+                )):
             self._setup_addons()
 
         if any((self.ui_ignore_operator,
                 self.ui_ignore_property,
                 self.ui_ignore_menu,
                 self.ui_ignore_label,
-        )):
+                )):
             self._setup_ui_ignore()
 
     def teardown(self):

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to