Commit 1c1ad3af authored by Stefan Behnel's avatar Stefan Behnel

include Python 2.6 in keyword string conversion (early releases didn't support unicode strings)

parent 956f1dfa
...@@ -27,7 +27,7 @@ try: ...@@ -27,7 +27,7 @@ try:
except ImportError: except ImportError:
from builtins import str as basestring from builtins import str as basestring
KEYWORDS_MUST_BE_BYTES = sys.version_info < (2,6) KEYWORDS_MUST_BE_BYTES = sys.version_info < (2,7)
non_portable_builtins_map = { non_portable_builtins_map = {
...@@ -142,7 +142,7 @@ class UtilityCodeBase(object): ...@@ -142,7 +142,7 @@ class UtilityCodeBase(object):
type = 'Code' type = 'Code'
utility = utilities.setdefault(name, [None, None, {}]) utility = utilities.setdefault(name, [None, None, {}])
else: else:
tags.setdefault(str(m.group(2)), set()).add(m.group(3)) tags.setdefault(m.group(2), set()).add(m.group(3))
lines.append('') # keep line number correct lines.append('') # keep line number correct
else: else:
lines.append(replace_comments('', line).rstrip()) lines.append(replace_comments('', line).rstrip())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment