Skip to content

Commit

Permalink
fixed a python 3.6 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
andli committed Feb 24, 2021
1 parent 22bfd2e commit 10da6a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
17 changes: 9 additions & 8 deletions pymkm/pymkm_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,14 +453,15 @@ def update_stock_prices_to_trend(

# Handle articles in shopping carts
articles_in_shopping_carts = api.get_articles_in_shoppingcarts()["article"]
article_ids_in_shopping_carts = [
x["idArticle"] for x in articles_in_shopping_carts
]
stock_list = [
x
for x in stock_list
if x["idArticle"] not in article_ids_in_shopping_carts
]
if articles_in_shopping_carts:
article_ids_in_shopping_carts = [
x["idArticle"] for x in articles_in_shopping_carts
]
stock_list = [
x
for x in stock_list
if x["idArticle"] not in article_ids_in_shopping_carts
]

partial_stock_update_size = 0
if partial > 0 or no_prompt:
Expand Down
4 changes: 3 additions & 1 deletion pymkm/pymkm_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,6 @@ def dicttoxml(input_dict_list, start_tag="request", item_tag="article"):
child.append(child_property)
xml_doc.append(child)

return tostring(xml_doc, encoding="UTF-8", xml_declaration=True).decode("utf-8")
return_string = tostring(xml_doc, encoding="UTF-8").decode("utf-8")

return return_string

0 comments on commit 10da6a9

Please sign in to comment.