(value)
| 465 | result = [] |
| 466 | |
| 467 | def iterateModuleNames(value): |
| 468 | def sysexit(message): |
| 469 | return plugin.sysexit(message) |
| 470 | |
| 471 | for v in value: |
| 472 | if type(v) in (tuple, list): |
| 473 | sysexit( |
| 474 | "Plugin '%s' needs to be change to only return modules names, not %r (for module '%s')" |
| 475 | % (plugin.plugin_name, v, module.getFullName()) |
| 476 | ) |
| 477 | |
| 478 | if inspect.isgenerator(v): |
| 479 | for w in iterateModuleNames(v): |
| 480 | yield w |
| 481 | |
| 482 | return |
| 483 | |
| 484 | if not checkModuleName(v): |
| 485 | sysexit( |
| 486 | "Plugin '%s' returned an invalid module name, not %r (for module '%s')" |
| 487 | % (plugin.plugin_name, v, module.getFullName()) |
| 488 | ) |
| 489 | |
| 490 | v = ModuleName(v) |
| 491 | |
| 492 | if v.getTopLevelPackageName() == "": |
| 493 | sysexit( |
| 494 | "Plugin '%s' returned an invalid relative module name, not %r (for module '%s')" |
| 495 | % (plugin.plugin_name, v, module.getFullName()) |
| 496 | ) |
| 497 | |
| 498 | yield v |
| 499 | |
| 500 | seen = set() |
| 501 |
nothing calls this directly
no test coverage detected