From 9d26151dfe7f8402a672e80dbf1e42f8262e275c Mon Sep 17 00:00:00 2001 From: Vlad-Stefan Harbuz Date: Thu, 27 Oct 2022 21:28:47 +0100 Subject: [PATCH] licenses: check that LICENSES/ is directory Signed-off-by: Vlad-Stefan Harbuz --- gitsrht/blueprints/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitsrht/blueprints/repo.py b/gitsrht/blueprints/repo.py index 6fede46..bdbd866 100644 --- a/gitsrht/blueprints/repo.py +++ b/gitsrht/blueprints/repo.py @@ -50,7 +50,7 @@ def get_license_info_for_tip(tip): break licenses = [] - if 'LICENSES' in tip.tree: + if 'LICENSES' in tip.tree and isinstance(tip.tree['LICENSES'], pygit2.Tree): for o in tip.tree['LICENSES']: license_id = os.path.splitext(o.name)[0] if license_id in SPDX_LICENSES: -- 2.38.4