[Bf-blender-cvs] [20499aa] ui-preview-buttons: Remove redundant del statements

Campbell Barton noreply at git.blender.org
Tue May 5 12:35:16 CEST 2015


Commit: 20499aa04774e07f42d9ba72c755fd839a623623
Author: Campbell Barton
Date:   Tue May 5 20:34:34 2015 +1000
Branches: ui-preview-buttons
https://developer.blender.org/rB20499aa04774e07f42d9ba72c755fd839a623623

Remove redundant del statements

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

M	release/scripts/modules/bpy/utils/previews.py

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

diff --git a/release/scripts/modules/bpy/utils/previews.py b/release/scripts/modules/bpy/utils/previews.py
index 6881456..4c69088 100644
--- a/release/scripts/modules/bpy/utils/previews.py
+++ b/release/scripts/modules/bpy/utils/previews.py
@@ -95,23 +95,15 @@ def new(name):
     return _previews_collections.setdefault(name, BPyPreviewsCollection(name))
 
 
-def _remove(name):
-    return _previews_collections.pop(name, None)
-
-
 def remove(name):
     """
     Remove the specified previews collection.
     """
-    pcoll = _remove(name)
-    if pcoll is not None:
-        del pcoll
+    _previews_collections.pop(name, None)
 
 
 def clear(self):
     """
     Delete all previews collections.
     """
-    for pcoll in _previews_collections.values():
-        del pcoll
     _previews_collections.clear()




More information about the Bf-blender-cvs mailing list