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

Add a flag -l to print the actions that were taken #20

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add a flag -l to print the actions that were taken #20

wants to merge 4 commits into from

Conversation

gabicavalcante
Copy link

No description provided.

@gabicavalcante gabicavalcante changed the title Add a flag -l to print the actions that were taken #18 Add a flag -l to print the actions that were taken Oct 5, 2016
@coveralls
Copy link

coveralls commented Oct 5, 2016

Coverage Status

Coverage decreased (-0.7%) to 95.833% when pulling 7971268 on I-am-Gabi:master into 75b8ba3 on chriscz:master.

Copy link
Owner

@chriscz chriscz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also write a test case for your implementation :)

@@ -21,7 +21,8 @@ def __init__(self,

do_process_dirs=False,
do_recurse=False,
do_remove_empty_dirs=False):
do_remove_empty_dirs=False,
print_log=False):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the do_ convention here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

if not os.path.isfile(src):
raise OSError("Source path is not a file: {}".format(src))
#print "mv {} --> {}".format(src, dst)
if print_log:
print("mv {} --> {}".format(src, dst))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lift the move printing to the Pysorter.process method instead

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

"""Moves the source directory INTO the destination"""
if not os.path.isdir(src):
raise OSError("Source path is not a directory: {}".format(src))
#print "mvd {} --> {}".format(src, dst)
if print_log:
print("mvd {} --> {}".format(src, dst))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for move_file

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@coveralls
Copy link

coveralls commented Oct 7, 2016

Coverage Status

Coverage decreased (-0.7%) to 95.833% when pulling be67153 on I-am-Gabi:master into 75b8ba3 on chriscz:master.

@gabicavalcante
Copy link
Author

I'm fixing the test, 1 min and I push it.

@chriscz
Copy link
Owner

chriscz commented Oct 9, 2016

Fixed the test yet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants