diff options
-rwxr-xr-x | autoimport.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoimport.py b/autoimport.py index d44c012..9c4c73e 100755 --- a/autoimport.py +++ b/autoimport.py @@ -60,7 +60,7 @@ def process_pkg(name, pkgdict, outpath): importcmd = ["python", "importpkg.py"] if "sha256hash" in pkgdict: importcmd.extend(["-H", pkgdict["sha256hash"]]) - if filename.startswith("http://"): + if filename.startswith(("http://", "https://", "ftp://", "file://")): with open(outpath, "w") as outp: dl = subprocess.Popen(["curl", "-s", filename], stdout=subprocess.PIPE, close_fds=True) @@ -95,7 +95,7 @@ def main(): pkgs = {} for d in args: print("processing %s" % d) - if d.startswith("http://"): + if d.startswith(("http://", "https://", "ftp://", "file://")): process_http(pkgs, d) elif os.path.isdir(d): process_dir(pkgs, d) |