naparuba/shinken — Issue #80: AttributeError: imported_from
Author: rootix2
Created: 2011-11-18 15:29:34+00:00
State: open

Problem if imported_from is not defined :
File "/opt/shinken/shinken/objects/item.py", line 648, in is_correct
safe_print("Error: the", i.__class__.my_type, i.get_name(), "is duplicated from", i.imported_from)
AttributeError: imported_from

I suggest to replace in item.py :
safe_print("Error: the", i.__class__.my_type, i.get_name(), "is duplicated from", i.imported_from)
by :
safe_print("Error: the", i.__class__.my_type, i.get_name(), "is duplicated from", getattr(i, 'imported_from', "unknown"))