Zope Content Management Framework (CMF)

GenericSetup: content fails for sub-objects w/o adapters

Reported by Tres Seaver on 2008-11-20
2
Affects Status Importance Assigned to Milestone
Zope CMF
Undecided
Tres Seaver

Bug Description

When importing content using the
Products.GenericSetup.content.FolderishExporterImporter, sub-objects
which can be created but then cannot be adapted to IFilesystemImporter
cause the import to fail:

------------------------ %< --------------------------
Traceback (most recent call last):
  File "bin/import_content", line 62, in ?
    intrexon.migrate.scripts.import_content.main('/home/tseaver/projects/agendaless/intrexon/buildouts/3.1.5.1/parts/instance/etc/zope.conf')
  File "/home/tseaver/projects/agendaless/intrexon/buildouts/3.1.5.1/src/intrexon.migrate/intrexon/migrate/scripts/import_content.py", line 180, in main
    importer()
  File "/home/tseaver/projects/agendaless/intrexon/buildouts/3.1.5.1/src/intrexon.migrate/intrexon/migrate/scripts/import_content.py", line 173, in __call__
    self.do_reload()
  File "/home/tseaver/projects/agendaless/intrexon/buildouts/3.1.5.1/src/intrexon.migrate/intrexon/migrate/scripts/import_content.py", line 153, in do_reload
    adapter.import_(import_ctx, '.', True)
  File "/home/tseaver/projects/agendaless/intrexon/buildouts/3.1.5.1/eggs/Products.GenericSetup-1.4.2.2-py2.4.egg/Products/GenericSetup/content.py", line 182, in import_
    IFilesystemImporter(wrapped).import_(import_context, subdir)
TypeError: ('Could not adapt', <AutoGroup at /intrexon/acl_users/auto_group>, <InterfaceClass Products.GenericSetup.interfaces.IFilesystemImporter>)
------------------------ %< --------------------------

Rather than failing, such objects should be skipped. The attached patch
against version 1.4.2.2 fixes this, but supplies no test.

Tres Seaver (tseaver) wrote :
Tres Seaver (tseaver) wrote :
Tres Seaver (tseaver) wrote :
Changed in zope-cmf:
assignee: nobody → tseaver
status: New → Fix Committed
Changed in zope-cmf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers