diff options
Diffstat (limited to 'autoimport.py')
-rwxr-xr-x | autoimport.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/autoimport.py b/autoimport.py index c7eb2f5..5c2c9be 100755 --- a/autoimport.py +++ b/autoimport.py @@ -61,7 +61,7 @@ def process_pkg(key, 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) @@ -96,7 +96,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) |