Skip to content

Commit

Permalink
Removed print statement in rsync.
Browse files Browse the repository at this point in the history
We don't want print statements in production code. Instead, we return
the `cmd` ran by `datreant.core.rsync.rsync`, since this is still useful
information and we don't use loggers at the moment.
  • Loading branch information
dotsdl committed Jun 27, 2016
1 parent a394d36 commit dcfc0bb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/datreant/core/rsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def rsync(source, dest, compress=True, backup=False, dry=False,

source = os.path.join(source, '') # Add trailing slash
cmd = [rsync_path] + opts + [source, dest]
print(cmd)
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
if p.returncode != 0:
Expand All @@ -44,3 +43,5 @@ def rsync(source, dest, compress=True, backup=False, dry=False,
'Standard error: {}'
'Standard output: {}']).format(
p.returncode, err, out))

return cmd

0 comments on commit dcfc0bb

Please sign in to comment.