]> arthur.barton.de Git - bup.git/blobdiff - cmd/list-idx-cmd.py
import-duplicity: use readpipe, not check_output
[bup.git] / cmd / list-idx-cmd.py
index a3e3dc96e7f4c695c729699adfb041971508e609..d2c981bf635b6b1392898660e950edabded350da 100755 (executable)
@@ -1,7 +1,15 @@
-#!/usr/bin/env python
+#!/bin/sh
+"""": # -*-python-*-
+bup_python="$(dirname "$0")/bup-python" || exit $?
+exec "$bup_python" "$0" ${1+"$@"}
+"""
+# end of bup preamble
+
 import sys, os
+
 from bup import git, options
-from bup.helpers import *
+from bup.helpers import add_error, handle_ctrl_c, log, qprogress, saved_errors
+
 
 optspec = """
 bup list-idx [--find=<prefix>] <idxfilenames...>
@@ -35,7 +43,7 @@ count = 0
 for name in extra:
     try:
         ix = git.open_idx(name)
-    except git.GitError, e:
+    except git.GitError as e:
         add_error('%s: %s' % (name, e))
         continue
     if len(opt.find) == 40: