[CMF-checkins] CVS: CMF/CMFSetup - interfaces.py:1.16.6.1 tool.py:1.19.2.1

Yvo Schubbe y.2004_ at wcm-solutions.de
Fri Oct 8 15:01:10 EDT 2004


Update of /cvs-repository/CMF/CMFSetup
In directory cvs.zope.org:/tmp/cvs-serv21703/CMFSetup

Modified Files:
      Tag: yuppie-collector287-branch
	interfaces.py tool.py 
Log Message:
- made sure imported values are converted to strings, using 'ascii' for now (http://collector.zope.org/CMF/287)


=== CMF/CMFSetup/interfaces.py 1.16 => 1.16.6.1 ===
--- CMF/CMFSetup/interfaces.py:1.16	Thu Aug 12 11:07:41 2004
+++ CMF/CMFSetup/interfaces.py	Fri Oct  8 15:01:10 2004
@@ -35,7 +35,7 @@
 
     def getEncoding():
 
-        """ Return the encoding used in data files.
+        """ Get the encoding used for configuration data within the site.
 
         o Return None if the data should not be encoded.
         """
@@ -377,6 +377,13 @@
 
     """ API for SetupTool.
     """
+
+    def getEncoding():
+
+        """ Get the encoding used for configuration data within the site.
+
+        o Return None if the data should not be encoded.
+        """
 
     def getProfileProduct():
 


=== CMF/CMFSetup/tool.py 1.19 => 1.19.2.1 ===
--- CMF/CMFSetup/tool.py:1.19	Wed Oct  6 06:02:30 2004
+++ CMF/CMFSetup/tool.py	Fri Oct  8 15:01:10 2004
@@ -143,6 +143,13 @@
     #
     #   ISetupTool API
     #
+    security.declareProtected( ManagePortal, 'getEncoding' )
+    def getEncoding( self ):
+
+        """ See ISetupTool.
+        """
+        return 'ascii'
+
     security.declareProtected( ManagePortal, 'getProfileProduct' )
     def getProfileProduct( self ):
 
@@ -212,7 +219,9 @@
         """ See ISetupTool.
         """
         profile_path = self._getFullyQualifiedProfileDirectory()
-        context = DirectoryImportContext( self, profile_path, purge_old )
+        encoding = self.getEncoding()
+        context = DirectoryImportContext( self, profile_path, purge_old,
+                                          encoding )
 
         info = self._import_registry.getStepMetadata( step_id )
 
@@ -243,7 +252,9 @@
         """ See ISetupTool.
         """
         profile_path = self._getFullyQualifiedProfileDirectory()
-        context = DirectoryImportContext( self, profile_path, purge_old )
+        encoding = self.getEncoding()
+        context = DirectoryImportContext( self, profile_path, purge_old,
+                                          encoding )
 
         steps = self._import_registry.sortSteps()
         messages = {}



More information about the CMF-checkins mailing list