Skip to content

fix: doit forget crashes with TypeError when no default tasks specified#484

Open
AruneshDwivedi wants to merge 1 commit into
pydoit:masterfrom
AruneshDwivedi:fix/forget-no-default-tasks
Open

fix: doit forget crashes with TypeError when no default tasks specified#484
AruneshDwivedi wants to merge 1 commit into
pydoit:masterfrom
AruneshDwivedi:fix/forget-no-default-tasks

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

doit forget throws TypeError: 'NoneType' object is not iterable when no default_tasks are configured in dodo.py. The _execute method tries to iterate over self.sel_tasks which is None when no default tasks exist.

Now treats None sel_tasks as 'all tasks' — consistent with how doit run works when no tasks are specified. A 2-line fix in cmd_forget.py.

When no default_tasks are configured, doit forget throws
TypeError: 'NoneType' object is not iterable because sel_tasks
is None. Now treats None as 'all tasks', consistent with how
doit run behaves when no tasks are specified.

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant