diff options
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/xmlpool/gen_xmlpool.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/util/xmlpool/gen_xmlpool.py b/src/util/xmlpool/gen_xmlpool.py index 64e631f74c4..56a67bcab55 100644 --- a/src/util/xmlpool/gen_xmlpool.py +++ b/src/util/xmlpool/gen_xmlpool.py @@ -9,6 +9,7 @@ from __future__ import print_function +import io import sys import gettext import re @@ -187,11 +188,9 @@ print("/***********************************************************************\ # Process the options template and generate options.h with all # translations. -template = open (template_header_path, "rb") +template = io.open (template_header_path, mode="rt", encoding='utf-8') descMatches = [] for line in template: - line = line.decode('utf-8') - if len(descMatches) > 0: matchENUM = reENUM .match (line) matchDESC_END = reDESC_END.match (line) |