From 3a9cd4c5f4f8dc1e6dc2fe4197608a972ac6192f Mon Sep 17 00:00:00 2001 From: Erica Windisch <73207+ewindisch@users.noreply.github.com> Date: Wed, 28 Aug 2019 11:32:07 -0400 Subject: [PATCH] Fix for function list filters Signed-off-by: Erica Windisch <73207+ewindisch@users.noreply.github.com> --- iopipe_cli/awslambda.py | 11 ++++------- setup.py | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/iopipe_cli/awslambda.py b/iopipe_cli/awslambda.py index 80700b9..a5f8c38 100755 --- a/iopipe_cli/awslambda.py +++ b/iopipe_cli/awslambda.py @@ -18,13 +18,10 @@ def list_functions(region, quiet, filter_choice): f["-x-iopipe-enabled"] = True if all: yield f - elif filter_choice == "installed": - if f["-x-iopipe-enabled"]: - yield f - continue - else: - if not f["-x-iopipe-enabled"]: - yield f + elif filter_choice == "installed" and f["-x-iopipe-enabled"]: + yield f + elif filter_choice == "not_installed" and not f["-x-iopipe-enabled"]: + yield f class MultipleLayersException(Exception): diff --git a/setup.py b/setup.py index e208061..c275211 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ setup( name='iopipe-cli', - version='0.1.6', + version='0.1.7', python_requires='>=3.3', description="cli utility for managing and instrumenting serverless applications", long_description=README,