[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, debian/master, updated. 810edbdd3feedbfe37f4a65bee50b57b2f60fa2a
Naparuba
naparuba at gmail.com
Tue Feb 28 22:07:14 UTC 2012
The following commit has been merged in the debian/master branch:
commit 49ca5a439781bc6a8de45bfae5d8e85a40a4b4c3
Author: Naparuba <naparuba at gmail.com>
Date: Mon Nov 21 09:49:26 2011 +0100
Fix: (from rootix2) catch case where service do not have imported_from from modules.
diff --git a/shinken/objects/item.py b/shinken/objects/item.py
index 7224470..4964c93 100644
--- a/shinken/objects/item.py
+++ b/shinken/objects/item.py
@@ -684,7 +684,7 @@ class Items(object):
# Ok, look at no twins (it's bad!)
for id in twins:
i = self.items[id]
- safe_print("Error: the", i.__class__.my_type, i.get_name(), "is duplicated from", i.imported_from)
+ safe_print("Error: the", i.__class__.my_type, i.get_name(), "is duplicated from", getattr(i, 'imported_from', "unknown source"))
r = False
# Then look if we have some errors in the conf
@@ -699,7 +699,7 @@ class Items(object):
# Then look for individual ok
for i in self:
if not i.is_correct():
- n = getattr(i, 'imported_from', "unknown")
+ n = getattr(i, 'imported_from', "unknown source")
safe_print("Error: In", i.get_name(), "is incorrect ; from", n)
r = False
--
UNNAMED PROJECT
More information about the Pkg-nagios-changes
mailing list