diff --git a/CHANGELOG b/CHANGELOG index c5ce222d..795baab5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ - Added support for Fulfillment.update_tracking ([#432](https://github.com/Shopify/shopify_python_api/pull/432)) - Add FulfillmentEvent resource ([#454](https://github.com/Shopify/shopify_python_api/pull/454)) +- Fix for being unable to get the len() of a filter ([#456](https://github.com/Shopify/shopify_python_api/pull/456)) == Version 8.2.0 - [Feature] Add support for Dynamic API Versioning. When the library is initialized, it will now make a request to diff --git a/scripts/shopify_api.py b/scripts/shopify_api.py index 60f48065..75c8acc7 100755 --- a/scripts/shopify_api.py +++ b/scripts/shopify_api.py @@ -52,8 +52,9 @@ def run_task(cls, task=None, *args): # Allow unambigious abbreviations of tasks if task not in cls._tasks: matches = filter(lambda item: item.startswith(task), cls._tasks) - if len(matches) == 1: - task = matches[0] + list_of_matches = list(matches) + if len(list_of_matches) == 1: + task = list_of_matches[0] else: sys.stderr.write('Could not find task "%s".\n' % (task))