Changeset 1416 in products for quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/exportimport.py
- Timestamp:
- Nov 26, 2009 11:11:11 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/exportimport.py
r679 r1416 1 import os 1 2 import tempfile 2 3 … … 84 85 85 86 def importSiteStructure(context): 86 # this function is also called when adding Plone site, so call standard handler87 if not context.readDataFile('.objects.xml', subdir='structure'):88 IFilesystemImporter(context.getSite()).import_(context, 'structure', True)89 return90 87 91 88 transmogrifier = ITransmogrifier(context.getSite()) … … 102 99 CONFIGFILE = None 103 100 transmogrifier._data = {} 101 102 # this function is also called when adding Plone site, so call standard handler 103 path = '' 104 if 'reader' in transmogrifier._raw: 105 path = transmogrifier._raw['reader'].get('path', '') 106 if not context.readDataFile('.objects.xml', subdir=os.path.join(path, 'structure')): 107 try: 108 from Products.GenericSetup.interfaces import IFilesystemImporter 109 IFilesystemImporter(context.getSite()).import_(context, 'structure', True) 110 except ImportError: 111 pass 112 return 104 113 105 114 options = transmogrifier._raw['transmogrifier']
Note: See TracChangeset
for help on using the changeset viewer.