From fb0a6733a7786142cab1fc381e972c9ceb92cb1f Mon Sep 17 00:00:00 2001 From: drfho Date: Wed, 11 Dec 2024 21:09:36 +0800 Subject: [PATCH] added compatibility to obsolete py2-function pybytes() After update old ZMS4/Py2 templates/py-script string processing errors with pybytes() may occur. This former charset fixing function does not exist anymore. For a smother updating it is synonymized with pystr() now. --- Products/zms/standard.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Products/zms/standard.py b/Products/zms/standard.py index 15c0a578f..bd0c3c880 100644 --- a/Products/zms/standard.py +++ b/Products/zms/standard.py @@ -72,6 +72,9 @@ def pystr(v, encoding='utf-8', errors='strict'): v = str(v) return v +security.declarePublic('pybytes') +# Just for compatibility of old ZMS4 templates. +pybytes = pystr # Umlauts umlaut_map = {