diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 12:59:26 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-06-29 12:59:26 +0400 |
commit | e192e7e02452c70511f688582d8d95d0a6267ee5 (patch) | |
tree | 75698ba122c3820668888ab38958e5c7e5cbb591 /source/blender/python/api2_2x/windowTheme.c | |
parent | 684869fd74a3a908a5df5802f440bfa823f6c802 (diff) |
remove unneeded checks from the python API
Diffstat (limited to 'source/blender/python/api2_2x/windowTheme.c')
-rw-r--r-- | source/blender/python/api2_2x/windowTheme.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/python/api2_2x/windowTheme.c b/source/blender/python/api2_2x/windowTheme.c index c8adec8e7a3..182a147e86d 100644 --- a/source/blender/python/api2_2x/windowTheme.c +++ b/source/blender/python/api2_2x/windowTheme.c @@ -807,15 +807,10 @@ static void Theme_dealloc( BPy_Theme * self ) static PyObject *Theme_getAttr( BPy_Theme * self, char *name ) { - PyObject *attr = Py_None; - if( !strcmp( name, "name" ) ) - attr = PyString_FromString( self->theme->name ); + return PyString_FromString( self->theme->name ); else if( !strcmp( name, "__members__" ) ) - attr = Py_BuildValue( "[s]", "name" ); - - if( attr != Py_None ) - return attr; + return Py_BuildValue( "[s]", "name" ); return Py_FindMethod( BPy_Theme_methods, ( PyObject * ) self, name ); } |