Skip to content

Commit

Permalink
Add encoding to bytes type cast
Browse files Browse the repository at this point in the history
  • Loading branch information
francas committed Dec 17, 2020
1 parent 59eb22a commit 7f53675
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prestapyt/prestapyt.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ def get_illegal_xml_chars(self):

illegal_ranges = [fr'{chr(low)}-{chr(high)}' for (low, high) in illegal_unichrs]
xml_illegal_character_regex = '[' + ''.join(illegal_ranges) + ']'
return re.compile(bytes(xml_illegal_character_regex))
return re.compile(bytes(xml_illegal_character_regex), , encoding='utf-8')

class PrestaShopWebServiceDict(PrestaShopWebService):
"""Interacts with the PrestaShop WebService API, use dict for messages."""
Expand Down

0 comments on commit 7f53675

Please sign in to comment.