[Zope] objectValues return value

David Bear David.Bear@asu.edu
Wed, 4 Dec 2002 10:17:56 -0700


I wrote a script the returns a list object of all title_or_id values of objects in a folder.  The problem is when there are no objects in the folder.  The script should return a list contianing the string 'none'.. but doesn't.  In fact, the script seems to either hang or have no return value...  

Any pointers?

# returns a python list contained the title of the page templates in this folder
list = context.objectValues('Page Template')
if list == None:
   return ['none']
newlist = []
for zpt in list:
   newlist.append(zpt.title_or_id())
return newlist


--

David Bear
College of Public Programs/ASU
Mail Code 0803