Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-06-29 12:59:26 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-06-29 12:59:26 +0400
commite192e7e02452c70511f688582d8d95d0a6267ee5 (patch)
tree75698ba122c3820668888ab38958e5c7e5cbb591 /source/blender/python/api2_2x/windowTheme.c
parent684869fd74a3a908a5df5802f440bfa823f6c802 (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.c9
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 );
}