From 6a67f59efe00a97095d1aaa40220179472434e5b Mon Sep 17 00:00:00 2001 From: boguta_m Date: Fri, 12 Sep 2014 15:00:15 +0200 Subject: [PATCH] added lists support for listing --- Shiba/marketplacemanagement.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Shiba/marketplacemanagement.py b/Shiba/marketplacemanagement.py index ca53dc8..13746fb 100644 --- a/Shiba/marketplacemanagement.py +++ b/Shiba/marketplacemanagement.py @@ -33,9 +33,14 @@ def get_product_list(self, scope="", kw="", nav="", refs="", productids="", nbpr """ if (type(refs) is not list and type(refs) is not str and type(refs) is not unicode) or \ (type(productids) is not list and type(productids) is not str and type(productids) is not unicode): - raise ShibaCallingError("Shiba code error : expected list or str/unicode as refs and/or productids parameters" - ", got " + unicode(type(refs)) + " as refs and " + unicode(type(productids)) - + " as productids instead.") + raise ShibaCallingError \ + ("Shiba code error : expected list or str/unicode as refs and/or productids parameters" + ", got " + unicode(type(refs)) + " as refs and " + unicode(type(productids)) + + " as productids instead.") + if type(refs) is list: + refs = ','.join(refs) + if type(productids) is list: + productids = ','.join(productids) inf = ShibaTools.inf_constructor(self.connection, "listing", **locals()) url = ShibaTools.url_constructor(self.connection, inf, domain="http://ws.priceminister.com") obj = ShibaTools.retrieve_obj_from_url(url)