Skip to content

Commit 338e180

Browse files
committed
syntax fix.
1 parent d807080 commit 338e180

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

textile/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def generate_tag(tag, content, attributes=None):
7272
except AttributeError:
7373
# Python 2.6 doesn't have the tostringlist method, so we have to treat
7474
# it differently.
75-
attributes = dict(map(lambda (k, v): (k, v.decode(enc)),
76-
attributes.items()))
75+
attributes = dict(map(lambda k, v: (k, six.text_type(v)),
76+
six.iteritems(attributes)))
7777
element = ElementTree.Element(tag, attrib=attributes)
7878
element_tag = ElementTree.tostring(element, encoding=enc)
7979
element_text = re.sub(r"<\?xml version='1.0' encoding='UTF-8'\?>\n",

0 commit comments

Comments
 (0)