From bba730ffd573111921964002e47e1504fcc47a97 Mon Sep 17 00:00:00 2001 From: z4yx Date: Sun, 19 Apr 2020 18:47:14 +0800 Subject: [PATCH] ignore blanks in Packages --- apt-sync.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apt-sync.py b/apt-sync.py index 0ab7a30..5fbf4a1 100755 --- a/apt-sync.py +++ b/apt-sync.py @@ -164,6 +164,8 @@ def apt_mirror(base_url: str, dist: str, repo: str, arch: str, dest_base_dir: Pa err = 0 deb_count = 0 for pkg in pkgidx_content.split('\n\n'): + if len(pkg) < 10: # ignore blanks + continue try: pkg_filename = pattern_package_name.search(pkg).group(1) pkg_size = int(pattern_package_size.search(pkg).group(1))