Skip to content

Commit 9433144

Browse files
committed
Allow for loading collections of collections/directories.
1 parent ddc3866 commit 9433144

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sc2reader/factories.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def load_resources(self, resources, resource_loader, options=None, **new_options
127127
:rtype: generator(Resource)
128128
"""
129129
options = options or utils.merged_dict(self.options, new_options)
130-
130+
print "Resources: "+str(resources)
131131
# Path to a resource?
132132
if isinstance(resources, basestring):
133133
if re.match(r'https?://',resources):
@@ -143,7 +143,9 @@ def load_resources(self, resources, resource_loader, options=None, **new_options
143143
# Collection of the above
144144
else:
145145
for resource in resources:
146-
yield resource_loader(resource, options=options)
146+
# Allow for nested collections and collections of directories
147+
for r in self.load_resources(resource, resource_loader, options=options):
148+
yield r
147149

148150
def load_resource(self, resource, options=None, **new_options):
149151
options = options or utils.merged_dict(self.options, new_options)

0 commit comments

Comments
 (0)