Skip to content

Commit

Permalink
Merge pull request akretion#166 from akretion/fix-warning
Browse files Browse the repository at this point in the history
[FIX] depreciation warning
  • Loading branch information
florian-dacosta authored Jun 15, 2023
2 parents 3083c10 + 2ccef73 commit aa4251d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions roulier/ws_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def remove_empty_tags(xml, ouput_as_string=True):
# use Jinja env for getting the path of template file
# pkg_resouces may be an alternative, but we already
# have Jinja
env = Environment(
loader=PackageLoader("roulier", "templates")
)
env = Environment(loader=PackageLoader("roulier", "templates"))
template = env.get_template("remove_empty_tags.xsl")
xsl = etree.parse(open(template.filename))
transform = etree.XSLT(xsl)
Expand All @@ -43,7 +41,7 @@ def get_parts(response):
an array of content-ids
"""
head_lines = ""
for k, v in response.raw.getheaders().items():
for k, v in response.raw.headers.items():
head_lines += str(k) + ":" + str(v) + "\n"
full = head_lines.encode() + response.content
parser = email.parser.BytesParser()
Expand Down

0 comments on commit aa4251d

Please sign in to comment.