metadata: simplify expression
This commit is contained in:
parent
e1f0828151
commit
ccd5b3aa66
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue