Skip to content

Commit

Permalink
Adiciona o parâmetro pretty_print=False para tostring() em XMLWithPre…
Browse files Browse the repository at this point in the history
… e PidProviderXMLAdapter (#539)
  • Loading branch information
robertatakenaka authored Jan 25, 2024
1 parent 6edce03 commit 14a18eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packtools/sps/pid_provider/xml_sps_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ def __init__(self, xml_with_pre, pkg_name=None):
self.xml_with_pre = xml_with_pre
self.pkg_name = pkg_name

def tostring(self):
return self.xml_with_pre.tostring()
def tostring(self, pretty_print=False):
return self.xml_with_pre.tostring(pretty_print=pretty_print)

@property
def sps_pkg_name(self):
Expand Down
8 changes: 6 additions & 2 deletions packtools/sps/pid_provider/xml_sps_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,12 @@ def article_id_parent(self):
front.append(parent)
return parent

def tostring(self):
return self.xmlpre + etree.tostring(self.xmltree, encoding="utf-8").decode(
def tostring(self, pretty_print=False):
return self.xmlpre + etree.tostring(
self.xmltree,
encoding="utf-8",
pretty_print=pretty_print,
).decode(
"utf-8"
)

Expand Down

0 comments on commit 14a18eb

Please sign in to comment.