metadata: simplify expression

This commit is contained in:
Alberto Planas 2020-10-13 18:26:12 +02:00
parent e1f0828151
commit ccd5b3aa66

View file

@ -373,9 +373,7 @@ class Metadata:
def from_file(cls, path): def from_file(cls, path):
instances = [] instances = []
members = Metadata.members(path) members = Metadata.members(path)
if not members: for member in (members or [path]):
members = [path]
for member in members:
instance = cls.from_json(Metadata.manifest(member)) instance = cls.from_json(Metadata.manifest(member))
instance._path = member instance._path = member
instances.append(instance) instances.append(instance)