[CMF-checkins] CVS: CMF/CMFCore - FSPropertiesObject.py:1.15 DirectoryView.py:1.35

Chris Withers chrisw@nipltd.com
Thu, 23 Jan 2003 09:31:46 -0500


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv25139/CMFCore

Modified Files:
	FSPropertiesObject.py DirectoryView.py 
Log Message:
Ensure that a couple of calls to string.split only split into a 
      maximum of two parts. 
      (Collector #82)

=== CMF/CMFCore/FSPropertiesObject.py 1.14 => 1.15 ===
--- CMF/CMFCore/FSPropertiesObject.py:1.14	Sat Aug  3 22:31:30 2002
+++ CMF/CMFCore/FSPropertiesObject.py	Thu Jan 23 09:31:12 2003
@@ -108,7 +108,7 @@
                 continue
 
             try:
-                propname, proptv = line.split(':')
+                propname, proptv = line.split(':',1)
                 #XXX multi-line properties?
                 proptype, propvstr = proptv.split( '=', 1 ) 
                 propname = propname.strip()


=== CMF/CMFCore/DirectoryView.py 1.34 => 1.35 ===
--- CMF/CMFCore/DirectoryView.py:1.34	Tue Jan 21 13:24:22 2003
+++ CMF/CMFCore/DirectoryView.py	Thu Jan 23 09:31:12 2003
@@ -112,7 +112,7 @@
             f.close()
             props = {}
             for line in lines:
-                try: key, value = split(line, '=')
+                try: key, value = split(line, '=',1)
                 except: pass
                 else:
                     props[strip(key)] = strip(value)