fixed command list

This commit is contained in:
LMKight 2017-04-02 15:11:13 +02:00
parent 8753b458fb
commit 6352c2e9b2
1 changed files with 3 additions and 2 deletions

View File

@ -27,8 +27,9 @@ def _get_commands_from_module(module, inproject):
d = {}
for cmd in _iter_command_classes(module):
if inproject or not cmd.requires_project:
cmdname = cmd.__module__.split('.')[-1]
d[cmdname] = cmd()
if not cmd.__module__ == module:
cmdname = cmd.__module__.split('.')[-1]
d[cmdname] = cmd()
return d
def _get_commands_from_entry_points(inproject, group='scrapy.commands'):