Hi all:
In an python script i put the following code:
"container.manage_delObjects([container.exampleFolder.getId()])" where "exampleFolder" is the
name of an object of type "Folder" in the "container". This code delete the "exampleFolder" OK.
But when I have the name of the "Folder" that i want to delete in a variable and call the
"manage_delObjects", example:
folderToDelete = "exampleFolder"
container.manage_delObjects([container[folderToDelete]])
#or
container.manage_delObjects([getattr(container, folderToDelete)])
----------------------------
I get the following error:
Error Type: AttributeError
Error Value: __getslice__
-----------------------------
The Traceback:
Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.PythonScripts.PythonScript, line 323, in _exec
  Module None, line 18, in update
   - <PythonScript at /approach/SiccApproach/Configuration/AuthenticationTypes/update>
   - Line 18
  Module OFS.ObjectManager, line 453, in manage_delObjects
  Module OFS.ObjectManager, line 241, in _getOb
AttributeError: __getslice__
-------------------------------
This appears that the "manage_delObjects" expect that somehow a non sequence entered a property
expected to be a sequence.?
My objetives is delete a object of type "Folder" in the "container" from this Script(Python)
I use Zope2.7
Thanks in advance!