Skip to content

Commit

Permalink
added lists support for listing
Browse files Browse the repository at this point in the history
  • Loading branch information
boguta_m committed Sep 12, 2014
1 parent 0dc1f97 commit 6a67f59
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Shiba/marketplacemanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6a67f59

Please sign in to comment.