aboutsummaryrefslogtreecommitdiff
path: root/src/ee/digikey/search_parts.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ee/digikey/search_parts.py')
-rw-r--r--src/ee/digikey/search_parts.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/ee/digikey/search_parts.py b/src/ee/digikey/search_parts.py
index 1f1184a..07459b1 100644
--- a/src/ee/digikey/search_parts.py
+++ b/src/ee/digikey/search_parts.py
@@ -124,13 +124,13 @@ class QueryEngine(object):
filtered_products = [p for p in response.products if get_field(p) == pn]
if len(filtered_products) == 0:
- print("No items matched the query.", file=self.log)
+ print("No items matched the query.\n", file=self.log)
result = "not-found"
else:
part = sorted(filtered_products, key=lambda p: p.part_number)[0]
- print("Found {} matching products, but their facts are the same so picked ``{}`` for more info.".format(
- len(filtered_products), part.part_number), file=self.log)
+ print("Found {} matching products, but their facts are the same so picked ``{}`` for more info.\n".
+ format(len(filtered_products), part.part_number), file=self.log)
page = self.client.get_for_product_url(part.url, part.part_number)
response = self.parser.parse_string(self.client.baseurl, page)
@@ -140,8 +140,8 @@ class QueryEngine(object):
self._collect_categories(product)
result = "found"
else:
- print("Unable to narrow down the part, got {} new products. Giving up.".format(
- len(response.products)), file=self.log)
+ print("Unable to narrow down the part, got {} new products. Giving up.\n".
+ format(len(response.products)), file=self.log)
result = "many"
elif response.response_type == SearchResponseTypes.TOO_MANY:
@@ -153,7 +153,7 @@ class QueryEngine(object):
if out_part.uri not in self.uri_idx:
self.out_parts.add(out_part)
- print("\nResult: {}".format(result), file=self.log)
+ print("Result: {}".format(result), file=self.log)
print("", file=self.log)
return response.response_type