From ccd5b3aa66a0973a6035efc6078ca448a1dcb7d4 Mon Sep 17 00:00:00 2001 From: Alberto Planas Date: Tue, 13 Oct 2020 18:26:12 +0200 Subject: [PATCH] metadata: simplify expression --- rust2rpm/metadata.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rust2rpm/metadata.py b/rust2rpm/metadata.py index 4a0b68c..306dd53 100644 --- a/rust2rpm/metadata.py +++ b/rust2rpm/metadata.py @@ -373,9 +373,7 @@ class Metadata: def from_file(cls, path): instances = [] members = Metadata.members(path) - if not members: - members = [path] - for member in members: + for member in (members or [path]): instance = cls.from_json(Metadata.manifest(member)) instance._path = member instances.append(instance)