amprolla

devuan's apt repo merger
git clone git://parazyd.org/amprolla.git
Log | Files | Refs | README | LICENSE

commit 61990d531cc3b64f61fcefae6da9bf5d7bb5321a
parent a0f2b7d8f0ac26130755a018c8e62fbae15f89e9
Author: parazyd <parazyd@dyne.org>
Date:   Thu,  1 Jun 2017 14:30:57 +0200

skip nonexistent when loading Packages files

Diffstat:
Mlib/package.py | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/package.py b/lib/package.py @@ -46,7 +46,8 @@ def load_packages_file(filename): """ Load a gzip'd packages file. Returns a dictionary of package name and package key-values. """ - if filename is not None: + # TODO: should we skip files like this if they don't exist? + if filename is not None and os.path.isfile(filename): packages_contents = gzip_open(filename).read() packages_contents = packages_contents.decode('utf-8') return parse_packages(packages_contents)