]> arthur.barton.de Git - bup.git/blobdiff - lib/bup/cmd/import_duplicity.py
chmod -x lib/bup/cmd/*.py
[bup.git] / lib / bup / cmd / import_duplicity.py
old mode 100755 (executable)
new mode 100644 (file)
index b2b011a..3e3cce7
@@ -1,19 +1,15 @@
 
 from __future__ import absolute_import
 from calendar import timegm
-from pipes import quote
 from subprocess import check_call
-from time import strftime, strptime
+from time import strptime
 import os, sys, tempfile
 
 from bup import git, helpers, options
-from bup.compat import argv_bytes, str_type
-from bup.helpers import (handle_ctrl_c,
-                         log,
-                         readpipe,
+from bup.compat import argv_bytes
+from bup.helpers import (log,
                          shstr,
-                         saved_errors,
-                         unlink)
+                         saved_errors)
 import bup.path
 
 
@@ -35,9 +31,10 @@ def exc(cmd, shell=False):
 
 def exo(cmd, shell=False, preexec_fn=None, close_fds=True):
     logcmd(cmd)
-    if not dry_run:
-        return helpers.exo(cmd, shell=shell, preexec_fn=preexec_fn,
-                           close_fds=close_fds)[0]
+    if dry_run:
+        return b''
+    return helpers.exo(cmd, shell=shell, preexec_fn=preexec_fn,
+                       close_fds=close_fds)[0]
 
 def redirect_dup_output():
     os.dup2(1, 3)