if(ikmo.getObjectType() == 'Folder'):
sReturnURL = 'Present?object=1.11.1234'
else:
sReturnURL = 'Present?object=%s' % (oid)


The above code when executed doesn't go inside the "if" condition despite the condition being true. Can anyone tell me where is the problem???

Editor for Python on Daniweb:
Please use the [code=python] and [/code] tag pair to enclose your python code.

Check the spelling of 'folder' ...

mytype = ikmo.getObjectType()
print mytype  # see if returns 'Folder' or 'folder'
if(ikmo.getObjectType() == 'Folder'):
    sReturnURL = 'Present?object=1.11.1234'
else:
    sReturnURL = 'Present?object=%s' % (oid)