summaryrefslogtreecommitdiff
path: root/addons/web_editor/controllers
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2018-11-08 15:03:33 +0000
committerAdrian Torres <adt@odoo.com>2018-11-29 09:28:17 +0000
commit758382b3a73da024d6e1dc04a474d2868223767a (patch)
treee37ea57fb6efabf9a14d30b39a74af664ddd1ed3 /addons/web_editor/controllers
parent52f5528cfb6d1152ee226e268247dc685a8ba329 (diff)
[REM] pycompat: remove python 2 shims and helpers
Odoo no longer supports python 2, thus some of these helpers can and have been replaced by python 3 built-ins, therefore there is no need for them to stay defined. The removed helpers are: * izip, imap and ifilter * unichr, text_type * implements_to_string, implements_iterator * string_types, integer_types * to_native The python 2 shims have also been removed, and only the python 3 helpers have been kept, because they can still be usable (i.e. accepting both bytes and str for functions that can only accept one of the two) [REM] pyjsparser: remove PY3 shims They're no longer necessary as Odoo doesn't officially support python 2 anymore. closes odoo/odoo#28519
Diffstat (limited to 'addons/web_editor/controllers')
-rw-r--r--addons/web_editor/controllers/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py
index 3a2e0d1d7aa..1b3f03966f3 100644
--- a/addons/web_editor/controllers/main.py
+++ b/addons/web_editor/controllers/main.py
@@ -95,7 +95,7 @@ class Web_Editor(http.Controller):
font_obj = ImageFont.truetype(addons_path + font, size)
# if received character is not a number, keep old behaviour (icon is character)
- icon = pycompat.unichr(int(icon)) if icon.isdigit() else icon
+ icon = chr(int(icon)) if icon.isdigit() else icon
# Determine the dimensions of the icon
image = Image.new("RGBA", (size, size), color=(0, 0, 0, 0))