patch from Stani to prevent hasattr(bpy.ops, '__call__') being True

This commit is contained in:
Campbell Barton 2009-10-27 15:25:27 +00:00
parent 560a0108b2
commit 4e7768066e

@ -24,18 +24,21 @@ class bpy_ops(object):
bpy.ops bpy.ops
''' '''
def add(self, pyop):
op_add(pyop)
def remove(self, pyop):
op_remove(pyop)
def __getattr__(self, module): def __getattr__(self, module):
''' '''
gets a bpy.ops submodule gets a bpy.ops submodule
''' '''
if module.startswith('__'):
raise AttributeError(module)
return bpy_ops_submodule(module) return bpy_ops_submodule(module)
def add(self, pyop):
op_add(pyop)
def remove(self, pyop):
op_remove(pyop)
def __dir__(self): def __dir__(self):
submodules = set() submodules = set()