Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
davilima6 committed Aug 29, 2018
1 parent 3f45f29 commit 62e2e5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGES.rst
Expand Up @@ -14,7 +14,9 @@ New features:

Bug fixes:

- *add item here*
- Fix Unauthorized error due to importing six inside Restricted Python
`Plone issue 2463 <https://github.com/plone/Products.CMFPlone/issues/2463>`_
[davilima6]


3.2.1 (2018-06-18)
Expand Down
10 changes: 6 additions & 4 deletions Products/CMFEditions/skins/CMFEditions/revertversion.py
Expand Up @@ -10,8 +10,6 @@
from Products.CMFEditions import CMFEditionsMessageFactory as _
from Products.CMFEditions.interfaces.IModifier import FileTooLargeToVersionError

import six


RESPONSE = context.REQUEST.RESPONSE
putils = container.plone_utils
Expand All @@ -27,8 +25,12 @@
view_url = context.absolute_url()

title = context.title_or_id()
if not isinstance(title, six.text_type):
title = six.text_type(title, 'utf-8', 'ignore')
try:
if not isinstance(title, unicode):
title = title.decode('utf-8', 'ignore')
except NameError:
# Python 3
pass

msg = _(u'${title} has been reverted to revision ${version}.',
mapping={'title': title,
Expand Down

0 comments on commit 62e2e5d

Please sign in to comment.