[CMF-checkins] CVS: CMF/CMFCore - FSMetadata.py:1.2
Andy McKay
andy@agmweb.ca
Fri, 14 Mar 2003 12:38:50 -0500
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv1679
Modified Files:
FSMetadata.py
Log Message:
Replace greedy except pass with something better and remove string imports
=== CMF/CMFCore/FSMetadata.py 1.1 => 1.2 ===
--- CMF/CMFCore/FSMetadata.py:1.1 Wed Mar 12 00:06:28 2003
+++ CMF/CMFCore/FSMetadata.py Fri Mar 14 12:38:49 2003
@@ -130,10 +130,9 @@
f.close()
props = {}
for line in lines:
- try: key, value = split(line, '=',1)
- except: pass
- else:
- props[strip(key)] = strip(value)
+ kv = line.split('=', 1)
+ if len(kv) == 2:
+ props[kv[0].strip()] = kv[1].strip()
return props
def _old_readSecurity(self):