[Zope] Error Value: 'File' object has no attribute 'manage_fixupOwnershipAfterAdd'

Roman Klesel roman_plonemail at lotuseyes.de
Mon Feb 20 06:20:31 EST 2006


Chris Withers schrieb:
>> for id in self.manage_targets.keys():                                   
>>     title =
>> self.manage_targets[id]['name']                               
>>     self.tgt_folder=Folder()   
> 
> 
> This is dangerous...

Why is that?

>>     self._setObject(id,self.tgt_folder)   
> 
> 
> This is silly...

What's silly about persisting the object I just created?


> Why not just:
> 
>         self.manage_addFolder(id,title)

Well, the suggestion I got was to do:

self.manage_addProduct['OFSP'].manage_addFolder(...

and this runs in the "Error Value: _getProducts"
Error.

> 
>> grinder_home = self.manage_targets['gr_sys']['grinder_home']           
>> host_name = self.getHostname(grinder_home)                               
> 
> 
> Okay, what type of object is 'self' here, where did you take this code
> from?

I'm proud to say: I wrote this myself. :-)

self is supposed to be a foldeish object that is supposed to be the container for all objects I'm about to create in
this routine.


>>     system = self.__getitem__(id)                                       
> 
> why not just:
> 
> system=self[id]


Great! Didn't know that!



> Also, this will result in system not being acquisition wrapped in some
> circumstances, what you really want is:
> 
> system = getattr(self,id)
> 
> ...but it really depends on what 'self' is, I'm not sure you have that
> right.

This also works. However to me it looks like, it produces the exact same result as __getitem__ and self[id] ...

This  "being acquisition wrapped" is driving me nuts!
I just don't get it.

And I belive it's the cause for the problems I'm facing ...

Thanks for taking the time analyzing my code!

Greetings Roman


More information about the Zope mailing list