diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-11 14:16:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-11 14:16:18 +0400 |
commit | 2c6a82dd0a9178efcaee0c3f8bbf3e5120a3dcaa (patch) | |
tree | e85b54189d81d1e2cac279fa40e8c5d0f95f3ff8 /release | |
parent | bf77ad00b3545107417104fc4f20e1f2a1ff0884 (diff) |
py api: minor change to operator attribute access, do identity comparison with None (no functional change).
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/modules/bpy_types.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py index 85a532e9a27..55ba82c5817 100644 --- a/release/scripts/modules/bpy_types.py +++ b/release/scripts/modules/bpy_types.py @@ -555,21 +555,21 @@ class Operator(StructRNA, metaclass=OrderedMeta): def __getattribute__(self, attr): properties = StructRNA.path_resolve(self, "properties") bl_rna = getattr(properties, "bl_rna", None) - if bl_rna and attr in bl_rna.properties: + if (bl_rna is not None) and (attr in bl_rna.properties): return getattr(properties, attr) return super().__getattribute__(attr) def __setattr__(self, attr, value): properties = StructRNA.path_resolve(self, "properties") bl_rna = getattr(properties, "bl_rna", None) - if bl_rna and attr in bl_rna.properties: + if (bl_rna is not None) and (attr in bl_rna.properties): return setattr(properties, attr, value) return super().__setattr__(attr, value) def __delattr__(self, attr): properties = StructRNA.path_resolve(self, "properties") bl_rna = getattr(properties, "bl_rna", None) - if bl_rna and attr in bl_rna.properties: + if (bl_rna is not None) and (attr in bl_rna.properties): return delattr(properties, attr) return super().__delattr__(attr) |