adding instance of Local File Sysem programattically
I'm doing something wrong, but I just don't seed it. from a python script container.manage_addProduct['Local File System'].addLocalFS( someid, sometitle, somebasepath) fails with a key error on 'Local File System'. However, if one builds a LFS from the ZMI and looks at the meta type, that's what is returned. I'm sure it's somthing simple. BTW, I am using version 1.0.
Dennis Allison wrote at 2003-6-10 21:30 -0700:
I'm doing something wrong, but I just don't seed it.
from a python script
container.manage_addProduct['Local File System'].addLocalFS( someid, sometitle, somebasepath)
I expect the product name is "LocalFS". The relevant name is the corresponding folder name in your "Products" file system folder. Dieter
When asked, a local file system reports that its meta_type is 'Local File System'. Programatic additions fail for 'LocalFS' as well. This is an old product. Was there an earlier mechanism for adding products that pre-dates the current scheme? On Wed, 11 Jun 2003, Dieter Maurer wrote:
Dennis Allison wrote at 2003-6-10 21:30 -0700:
I'm doing something wrong, but I just don't seed it.
from a python script
container.manage_addProduct['Local File System'].addLocalFS( someid, sometitle, somebasepath)
I expect the product name is "LocalFS".
The relevant name is the corresponding folder name in your "Products" file system folder.
Dieter
On Wed, 2003-06-11 at 14:34, Dennis Allison wrote:
When asked, a local file system reports that its meta_type is 'Local File System'.
Product name and meta_type aren't the same thing, though they are frequently similar. Look at the name of the product folder installed in ZOPE/lib/python/Products or see how the product is listed in the Product Management folder in the Control Panel. HTH, Dylan
Dennis Allison wrote at 2003-6-11 14:34 -0700:
When asked, a local file system reports that its meta_type is 'Local File System'.
Programatic additions fail for 'LocalFS' as well.
This is an old product. Was there an earlier mechanism for adding products that pre-dates the current scheme?
There was. It is called "folder methods". The constructors were added to the "ObjectManager" (maybe "Folder") class by monkey patching. You can use my "DocFinder" product to check whether your folders contain a method to add LocalFS instances. Dieter
participants (3)
-
Dennis Allison -
Dieter Maurer -
Dylan Reinhardt