diff --git a/project/export/cli.py b/project/export/cli.py index a50d018..186957f 100644 --- a/project/export/cli.py +++ b/project/export/cli.py @@ -6,16 +6,13 @@ from project.export import exports @click.argument('sections', nargs=-1) def cli(sections): functions = [f for k, f in exports.__dict__.items() if is_function(f)] - print("got all functions", functions) if sections: # If they don't want to export everything - print("YOu specified sections") - for func in functions: - if func.__name__ not in sections: - print("{} not in {}".format(func.__name__, sections)) - functions.remove(func) - print("Calling functions", functions) + temp_functions = functions + functions = [] + for func in temp_functions: + if func.__name__ in sections: + functions.append(func) for func in functions: - print("Calling", func.__name__) func() return 0