]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/help-cmd.py
Remove $(dirname "$0") from sys.path
[bup.git] / lib / cmd / help-cmd.py
index 684df72c03ea87169fa31781df7e0157ad66f137..6892cab9b5b55ed8f310c848ec36d68eacfc4efa 100755 (executable)
@@ -15,9 +15,12 @@ exec "$bup_python" "$0"
 # end of bup preamble
 
 from __future__ import absolute_import
-import os, glob, sys
 
-sys.path[:0] = [os.path.dirname(os.path.realpath(__file__)) + '/..']
+# Intentionally replace the dirname "$0" that python prepends
+import os, sys
+sys.path[0] = os.path.dirname(os.path.realpath(__file__)) + '/..'
+
+import glob
 
 from bup import compat, options, path
 from bup.compat import argv_bytes