Skip to content

Commit

Permalink
Fix MimeTypeException deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Jun 10, 2017
1 parent 5e30a82 commit 38a397b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ New features:

Bug fixes:

- *add item here*
- Fix MimeTypeException deprecation warnings
[ale-rt]


2.3.5 (2017-05-29)
Expand Down
8 changes: 7 additions & 1 deletion Products/ATContentTypes/content/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from Products.CMFCore.permissions import ModifyPortalContent
from Products.CMFCore.permissions import View
from Products.CMFCore.utils import getToolByName
from Products.MimetypesRegistry.common import MimeTypeException
from Products.validation import V_REQUIRED
from Products.validation.config import validation
from Products.validation.validators.SupplValidators import MaxSizeValidator
Expand All @@ -28,6 +27,13 @@
import logging


try:
from Products.MimetypesRegistry.interfaces import MimeTypeException
except ImportError:
# Products.MimetypesRegistry < 2.1
from Products.MimetypesRegistry.common import MimeTypeException


LOG = logging.getLogger('ATCT')

validation.register(MaxSizeValidator('checkFileMaxSize',
Expand Down

0 comments on commit 38a397b

Please sign in to comment.