use same Python version for autoimport and importpkg
[~helmut/debian-dedup.git] / autoimport.py
index 5f14b2e..0d26fe4 100755 (executable)
@@ -11,6 +11,7 @@ import optparse
 import os
 import sqlite3
 import subprocess
+import sys
 import tempfile
 try:
     from urllib.parse import unquote
@@ -64,7 +65,7 @@ def process_dir(pkgs, d):
 def process_pkg(name, pkgdict, outpath):
     filename = pkgdict["filename"]
     print("importing %s" % filename)
-    importcmd = ["python", "importpkg.py"]
+    importcmd = [sys.executable, "importpkg.py"]
     if "sha256hash" in pkgdict:
         importcmd.extend(["-H", pkgdict["sha256hash"]])
     if filename.startswith(("http://", "https://", "ftp://", "file://")):