[Checkins] SVN: Products.GenericSetup/trunk/ - newlines are now normalized during import

Yvo Schubbe y.2011 at wcm-solutions.de
Mon Jul 18 05:51:07 EDT 2011


Log message for revision 122274:
  - newlines are now normalized during import

Changed:
  UU  Products.GenericSetup/trunk/Products/GenericSetup/PythonScripts/exportimport.py
  U   Products.GenericSetup/trunk/docs/CHANGES.rst

-=-
Modified: Products.GenericSetup/trunk/Products/GenericSetup/PythonScripts/exportimport.py
===================================================================
--- Products.GenericSetup/trunk/Products/GenericSetup/PythonScripts/exportimport.py	2011-07-17 19:29:41 UTC (rev 122273)
+++ Products.GenericSetup/trunk/Products/GenericSetup/PythonScripts/exportimport.py	2011-07-18 09:51:06 UTC (rev 122274)
@@ -11,8 +11,6 @@
 #
 ##############################################################################
 """PythonScript export / import support.
-
-$Id$
 """
 
 from zope.component import adapts
@@ -38,6 +36,7 @@
     def _importBody(self, body):
         """Import the object from the file body.
         """
+        body = body.replace('\r\n', '\n').replace('\r', '\n')
         self.context.write(body)
 
     body = property(_exportBody, _importBody)


Property changes on: Products.GenericSetup/trunk/Products/GenericSetup/PythonScripts/exportimport.py
___________________________________________________________________
Deleted: svn:keywords
   - Id

Modified: Products.GenericSetup/trunk/docs/CHANGES.rst
===================================================================
--- Products.GenericSetup/trunk/docs/CHANGES.rst	2011-07-17 19:29:41 UTC (rev 122273)
+++ Products.GenericSetup/trunk/docs/CHANGES.rst	2011-07-18 09:51:06 UTC (rev 122274)
@@ -4,6 +4,8 @@
 1.6.4 (unreleased)
 ------------------
 
+- PythonScript handler: Newlines are now normalized during import.
+
 - No longer rely on `bobobase_modification_time`.
 
 - TarballImportContext: Fixed type of 'getLastModified' return value.



More information about the checkins mailing list