Changeset 11029
- Timestamp:
- 04/08/05 18:47:29 (5 years ago)
- Files:
-
- CPSIO/trunk/export_modules/CPS3Exporter.py (modified) (7 diffs)
- CPSIO/trunk/export_modules/Plone2Exporter.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
CPSIO/trunk/export_modules/CPS3Exporter.py
r11017 r11029 20 20 21 21 import os, random 22 from types import ListType, TupleType , DictType22 from types import ListType, TupleType 23 23 from elementtree.ElementTree import ElementTree, Element, SubElement 24 24 25 import Acquisition26 25 from Acquisition import aq_base 27 26 from Globals import InitializeClass … … 30 29 from zLOG import LOG, DEBUG, INFO, WARNING, ERROR 31 30 32 from Products.CMFCore.utils import UniqueObject,getToolByName31 from Products.CMFCore.utils import getToolByName 33 32 from Products.CMFCore.permissions import ManagePortal 34 33 … … 237 236 el = SubElement(parent, "{%s}cpsfti" % self.ns_uri) 238 237 el.set('id', pt_id) 239 from types import ListType, TupleType240 238 # process properties 241 239 for prop in self._getFTIProperties(fti): … … 254 252 else: 255 253 el2 = SubElement(el, "{%s}%s" % (self.ns_uri, prop[0])) 256 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType):254 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType): 257 255 el2.text = ','.join([token for token in prop[1]]) 258 256 else: … … 270 268 el = SubElement(parent, "{%s}cmffti" % self.ns_uri) 271 269 el.set('id', pt_id) 272 from types import ListType, TupleType273 270 # process properties 274 271 for prop in self._getFTIProperties(fti): … … 288 285 else: 289 286 el2 = SubElement(el, "{%s}%s" % (self.ns_uri, prop[0])) 290 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType):287 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType): 291 288 el2.text = ','.join([token for token in prop[1]]) 292 289 else: … … 1410 1407 for p in proxy.ac_inherited_permissions(1): 1411 1408 name, value = p[:2] 1412 p =Permission(name,value,proxy)1413 roles =p.getRoles(default=[])1409 p = Permission(name,value,proxy) 1410 roles = p.getRoles(default=[]) 1414 1411 if not type(roles) is ListType: 1415 1412 not_acquired_permissions.append(name) CPSIO/trunk/export_modules/Plone2Exporter.py
r10996 r11029 18 18 # $Id$ 19 19 20 from Globals import InitializeClass 21 22 from Products.CMFCore.permissions import ManagePortal 20 23 from Products.CPSIO.BaseExporter import BaseExporter 21 24 from Products.CPSIO.IOBase import IOBase 22 25 23 import os, random24 25 import Acquisition26 from Acquisition import aq_base27 from Globals import InitializeClass28 from AccessControl.Permission import Permission29 30 from Products.CMFCore.utils import UniqueObject31 from Products.CMFCore.permissions import ManagePortal32 26 from AccessControl import ClassSecurityInfo 33 27 34 28 from elementtree.ElementTree import ElementTree, Element, SubElement 35 29 36 from zipfile import ZipFile 37 import re # for Perl-style regular expression operations 38 39 from types import ListType 30 import os 31 from types import ListType, TupleType 40 32 41 33 from zLOG import LOG, DEBUG, INFO, WARNING, ERROR … … 133 125 el = SubElement(parent, "{%s}cmffti" % self.ns_uri) 134 126 el.set('id', pt_id) 135 from types import ListType, TupleType136 127 # process properties 137 128 for prop in self._getFTIProperties(fti): … … 148 139 else: 149 140 el2 = SubElement(el, "{%s}%s" % (self.ns_uri, prop[0])) 150 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType):141 if isinstance(prop[1], ListType) or isinstance(prop[1], TupleType): 151 142 el2.text = ','.join([token for token in prop[1]]) 152 143 else: … … 422 413 if self.export_hierarchy_method in ('wssc', 'ws'): 423 414 ws_el = self.createFolder('workspaces', 'Workspace', root, 424 {'title': ' Root of workspaces'},425 {'Title': ' Root of workspaces'})415 {'title': 'Workspaces'}, 416 {'Title': 'Workspaces'}) 426 417 427 418 if self.export_hierarchy_method in ('wssc', 'sc'): 428 419 sc_el = self.createFolder('sections', 'Section', root, 429 {'title': ' Root of sections'},430 {'Title': ' Root of sections'})420 {'title': 'Sections'}, 421 {'Title': 'Sections'}) 431 422 432 423 # get all CMF/Plone hierarchy elements which are direct children
