-
Notifications
You must be signed in to change notification settings - Fork 17
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
I'm fixing the test, 1 min and I push it. |
Fixed the test yet? |
No description provided.