Exception when comparing tasks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
doit |
Fix Released
|
Undecided
|
schettino72 |
Bug Description
Using the latest code (rev. 387), the following exception is raised when tasks are compared:
Traceback (most recent call last):
File "/usr/lib/
return sub_cmd[
File "/usr/lib/
return self.do_cmd(params, args)
File "/usr/lib/
params[
File "/usr/lib/
task_control = TaskControl(
File "/usr/lib/
self.
File "/usr/lib/
return self.name == other.name
AttributeError: 'str' object has no attribute 'name'
Apparently, task dependencies are strings, but the Task.__eq__ comparison method expects them to be only Task objects.
Changed in doit: | |
milestone: | none → 0.12.0 |
assignee: | nobody → schettino72 (schettino72) |
status: | New → Fix Committed |
Changed in doit: | |
status: | Fix Committed → Fix Released |
The attached patch fixes the issue and doesn't break any test.
However, I'm not sure if comparing a Task against a string is fine with doit design.