Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleaned Bags Get Counted Incorrecly #58

Open
jfarbowitz opened this issue Apr 14, 2021 · 1 comment
Open

Cleaned Bags Get Counted Incorrecly #58

jfarbowitz opened this issue Apr 14, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jfarbowitz
Copy link
Member

When I run --clean, it skips things that aren't bags, but then reports that they were cleaned successfully. Need to do something similar to what we did with validation.

(base) ponziChain:grabbags Jonathan$ grabbags --clean ~/Desktop/
2021-04-14 19:10:26,054 - WARNING - /Users/Jonathan/Desktop/test_data is not a bag. Not cleaning.
2021-04-14 19:10:26,055 - WARNING - /Users/Jonathan/Desktop/desktop is not a bag. Not cleaning.
2021-04-14 19:10:26,055 - WARNING - /Users/Jonathan/Desktop/a-bag is not a bag. Not cleaning.
2021-04-14 19:10:26,055 - WARNING - /Users/Jonathan/Desktop/parent-dir is not a bag. Not cleaning.
2021-04-14 19:10:26,055 - WARNING - /Users/Jonathan/Desktop/techfocus-vimeo is not a bag. Not cleaning.
2021-04-14 19:10:26,055 - INFO - 5 bags cleaned successfully
@jfarbowitz jfarbowitz added the bug Something isn't working label Apr 14, 2021
@milothiesen milothiesen self-assigned this Apr 15, 2021
@henryborchers
Copy link
Member

The counting of the bags variables [successes, failures, and not_a_bag] are global variables. This shouldn't be. If we need to keep start, we should move the functions affected by it into a class and move the variables as instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants