Skip to content

Commit

Permalink
Merge pull request #11 from devopshq/to_xml
Browse files Browse the repository at this point in the history
rm encode #10
  • Loading branch information
allburov authored Nov 10, 2017
2 parents 563743f + ae66bd0 commit 69776eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions youtrack/youtrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ def _update(self, xml):
self.values = []

def to_xml(self):
result = '<%s name="%s">' % (self._bundle_tag_name, escape(self.name.encode('utf-8')))
result += ''.join(v.toXml() for v in self.values)
result = '<%s name="%s">' % (self._bundle_tag_name, escape(self.name))
result += ''.join(v.to_xml() for v in self.values)
result += '</%s>' % self._bundle_tag_name
return result

Expand Down Expand Up @@ -628,11 +628,11 @@ def to_xml(self):
if value is None or not len(value):
continue
if isinstance(elem, str):
elem = elem.encode('utf-8')
elem = elem
if isinstance(value, str):
value = value.encode('utf-8')
value = value
result += ' %s="%s"' % (escape(elem), escape(str(value)))
result += ">%s</%s>" % (escape(self.name.encode('utf-8')), self.element_name)
result += ">%s</%s>" % (escape(self.name), self.element_name)
return result

def _update(self, xml):
Expand Down

0 comments on commit 69776eb

Please sign in to comment.