]> arthur.barton.de Git - bup.git/blobdiff - cmd/on-cmd.py
Add probabilistic "bup gc", but require --unsafe
[bup.git] / cmd / on-cmd.py
index df0fdb3158faaf6091bf8977dd054764b66313e6..10b1e3f249710aae44fae64faa4af83a81624bd6 100755 (executable)
@@ -4,10 +4,13 @@ bup_python="$(dirname "$0")/bup-python" || exit $?
 exec "$bup_python" "$0" ${1+"$@"}
 """
 # end of bup preamble
+
 import sys, os, struct, getopt, subprocess, signal
+
 from subprocess import PIPE
 from bup import options, ssh, path
-from bup.helpers import *
+from bup.helpers import DemuxConn, log
+
 
 optspec = """
 bup on <hostname> index ...
@@ -63,11 +66,11 @@ try:
                 if sp:
                     sp.wait()
                 break
-            except SigException, e:
+            except SigException as e:
                 log('\nbup on: %s\n' % e)
                 os.kill(p.pid, e.signum)
                 ret = 84
-except SigException, e:
+except SigException as e:
     if ret == 0:
         ret = 99
     log('\nbup on: %s\n' % e)