diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-12 11:43:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-12 11:43:30 +0300 |
commit | 20e561dd6a2eaf2ae8b93253f1d526460367e287 (patch) | |
tree | c38837c6ed0f3796bf0ce6872314d9cffc8638fe /release/scripts/modules/bpy | |
parent | f6dc0e918b2687de067f2696b070b77f1a19a00b (diff) |
PyAPI: Remove release method, just use delitem
Diffstat (limited to 'release/scripts/modules/bpy')
-rw-r--r-- | release/scripts/modules/bpy/utils/previews.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/release/scripts/modules/bpy/utils/previews.py b/release/scripts/modules/bpy/utils/previews.py index 9e407d619f1..bd6b6a0d304 100644 --- a/release/scripts/modules/bpy/utils/previews.py +++ b/release/scripts/modules/bpy/utils/previews.py @@ -100,12 +100,6 @@ class ImagePreviewCollection(dict): return p load.__doc__ = _utils_previews.load.__doc__ - def release(self, name): - p = self.pop(name, None) - if p is not None: - _utils_previews.release(self._gen_key(name)) - release.__doc__ = _utils_previews.release.__doc__ - def clear(self): """Clear all previews.""" for name in self.keys(): @@ -118,7 +112,8 @@ class ImagePreviewCollection(dict): _uuid_open.remove(self._uuid) def __delitem__(self, key): - return self.release(key) + _utils_previews.release(self._gen_key(name)) + super().__delitem__(key) def __repr__(self): return "<%s id=%s[%d], %s>" % ( |