From b9dc031e86f4cf2e5d04e828a741ad9dda56b3f1 Mon Sep 17 00:00:00 2001 From: Aditya Hase Date: Thu, 7 Feb 2019 18:10:30 +0530 Subject: [PATCH] fix(py3): Use range instead of xrange --- .../tax_withholding_category/test_tax_withholding_category.py | 2 +- .../doctype/amazon_mws_settings/amazon_methods.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py index 2530196708..638e57ed2b 100644 --- a/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py +++ b/erpnext/accounts/doctype/tax_withholding_category/test_tax_withholding_category.py @@ -22,7 +22,7 @@ class TestTaxWithholdingCategory(unittest.TestCase): invoices = [] # create invoices for lower than single threshold tax rate - for _ in xrange(2): + for _ in range(2): pi = create_purchase_invoice(supplier = "Test TDS Supplier") pi.submit() invoices.append(pi) diff --git a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py index 3234e7a332..c21f11ead7 100644 --- a/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py +++ b/erpnext/erpnext_integrations/doctype/amazon_mws_settings/amazon_methods.py @@ -40,7 +40,7 @@ def get_products_details(): products_response = call_mws_method(products.get_matching_product,marketplaceid=marketplace, asins=asin_list) - matching_products_list = products_response.parsed + matching_products_list = products_response.parsed for product in matching_products_list: skus = [row["sku"] for row in sku_asin if row["asin"]==product.ASIN] for sku in skus: @@ -116,7 +116,7 @@ def call_mws_method(mws_method, *args, **kwargs): mws_settings = frappe.get_doc("Amazon MWS Settings") max_retries = mws_settings.max_retry_limit - for x in xrange(0, max_retries): + for x in range(0, max_retries): try: response = mws_method(*args, **kwargs) return response