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):
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)