[CMF-checkins] CVS: CMF - ContentTypeRegistry.py:1.4
tseaver@digicool.com
tseaver@digicool.com
Tue, 5 Jun 2001 14:36:41 -0400 (EDT)
Update of /cvs-repository/CMF/CMFCore
In directory korak.digicool.com:/tmp/cvs-serv8904
Modified Files:
ContentTypeRegistry.py
Log Message:
- Ensure that ContentTypeRegistry's "Test" tab doesn't puke if no
MIMEtype is entered, or if one is entered which doesn't have a
'/' in it (Tracker #292).
--- Updated File ContentTypeRegistry.py in package CMF --
--- ContentTypeRegistry.py 2001/05/26 04:35:52 1.3
+++ ContentTypeRegistry.py 2001/06/05 18:36:41 1.4
@@ -70,6 +70,9 @@
if self.minor is None:
return 0
+ typ = typ or '/'
+ if not '/' in typ:
+ typ = typ + '/'
major, minor = SLASH_SPLIT.split( typ )
if self.major and not major in self.major: