Products.CMFPlone/cssmin_relacement: remove python version check and explicit translation into a

Alexander Loechel <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: Products.CMFPlone
Branch: refs/heads/cssmin_relacement
Date: 2017-07-21T12:00:48+02:00
Author: Alexander Loechel (loechel) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/060fbd81c602b87da8b32d1a27292bf23e3fcfa8

remove python version check and explicit translation into a unicode object, as pyscss takes both and unicode is returned

Files changed:
M Products/CMFPlone/resources/browser/cook.py

diff --git a/Products/CMFPlone/resources/browser/cook.py b/Products/CMFPlone/resources/browser/cook.py
index 7ddbb6ab7..3e67ab14d 100644
--- a/Products/CMFPlone/resources/browser/cook.py
+++ b/Products/CMFPlone/resources/browser/cook.py
@@ -18,7 +18,6 @@
 from zope.interface import alsoProvides
 
 import logging
-import sys
 
 
 logger = logging.getLogger('Products.CMFPlone')
@@ -95,8 +94,6 @@ def cookWhenChangingSettings(context, bundle=None):
                     logger.info('Cooking css %s', css_resource)
                     css = response.getBody()
                     if css_resource[-8:] != '.min.css':
-                        if sys.version_info == (2):
-                            css = unicode(css)  # Python 2 only function
                         css = css_compiler.compile_string(css)
                     cooked_css += u'\n/* Resource: {0} */\n{1}\n'.format(
                         css_resource,



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.