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)