diff options
author | Helmut Grohne <helmut@subdivi.de> | 2014-04-21 12:50:15 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2014-04-21 12:50:15 +0200 |
commit | 03d6cc0a5ac4d546f234d8326551f2ee35e0f1a5 (patch) | |
tree | 58e56c82c079308bb19ce0aed164147acf3639d1 | |
parent | bb0aea9971bc79d8787d8f034022d0ca803fcab3 (diff) | |
download | debian-dedup-03d6cc0a5ac4d546f234d8326551f2ee35e0f1a5.tar.gz |
autoimport: support protocols besides http
-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) |