rsync_backup /

Diff from to


 from os.path import exists, abspath
 import sys
 import errno
-import subprocess
+from subprocess import call as cmd
 import shutil
 RSYNC = "rsync -avH --numeric-ids --link-dest=%(link_dst)s %(src)s/ %(dst)s/"
 def rsync(src, dst, link_dst):
     """backup contents of src directory into dst directory"""
-    cmd = RSYNC % dict(src=abspath(src),
-                       dst=abspath(dst),
-                       link_dst=abspath(link_dst))
-    rc =
-    return rc
+    return cmd(RSYNC % dict(src=abspath(src),
+                            dst=abspath(dst),
+                            link_dst=abspath(link_dst)),
+               shell=True)
 def dirshift(path, n, token):