[Zope-CVS] CVS: Products/AdaptableStorage/serial_ofs - MetaTypeClassifier.py:1.13
Shane Hathaway
shane@zope.com
Wed, 5 Feb 2003 13:17:27 -0500
Update of /cvs-repository/Products/AdaptableStorage/serial_ofs
In directory cvs.zope.org:/tmp/cvs-serv7534/serial_ofs
Modified Files:
MetaTypeClassifier.py
Log Message:
Fixed the classification of unknown files with no extension.
=== Products/AdaptableStorage/serial_ofs/MetaTypeClassifier.py 1.12 => 1.13 ===
--- Products/AdaptableStorage/serial_ofs/MetaTypeClassifier.py:1.12 Tue Feb 4 23:59:18 2003
+++ Products/AdaptableStorage/serial_ofs/MetaTypeClassifier.py Wed Feb 5 13:17:25 2003
@@ -132,11 +132,12 @@
if not ext.startswith('.'):
ext = '.' + ext
mt = self.ext_to_mt.get(ext.lower())
- if not mt:
- mt = self.ext_to_mt.get('<file>', 'File')
+ if not mt:
+ mt = self.ext_to_mt.get('<file>', 'File')
else:
raise DeserializationError(
'No classification known for %s' % repr(keychain))
+ assert mt is not None
classification['meta_type'] = mt
mapper_name = self.mt_to_mapper.get(mt)
if mapper_name is None: