Skip to content

Commit 7d4dff2

Browse files
committed
Comply to PEP 0479 about how to terminate a generator.
1 parent 51b9869 commit 7d4dff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_nodev/collect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def generate_module_objects(module, predicate=None):
131131
module_members = inspect.getmembers(module, predicate)
132132
except Exception as ex:
133133
logger.info("Failed to get members of module %r: %s", module, ex)
134-
raise StopIteration
134+
return
135135
for object_name, object_ in module_members:
136136
if inspect.getmodule(object_) is module:
137137
yield object_name, object_

0 commit comments

Comments
 (0)