From 707229b36ecaa6345844109ccb001900931a15d2 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Sat, 9 Nov 2013 05:10:37 +0100 Subject: [PATCH] renamed _name to name in members.py and changed config files. individual entries in the config MUST have the underscore prefix; not the code! --- examples/dev.json | 4 ++-- examples/minimal.json | 2 +- examples/stress.json | 2 +- linspector/config/members.py | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/dev.json b/examples/dev.json index 83c3526..c164fd0 100644 --- a/examples/dev.json +++ b/examples/dev.json @@ -1,7 +1,7 @@ { "members":{ "root":{ - "name": "root", + "_name": "root", "tasks": [ { "class": "alert/mail", @@ -31,7 +31,7 @@ ] }, "hannes":{ - "name": "hannes", + "_name": "hannes", "tasks": [ { "class": "alert/mail", diff --git a/examples/minimal.json b/examples/minimal.json index 34617a7..f61d136 100644 --- a/examples/minimal.json +++ b/examples/minimal.json @@ -10,7 +10,7 @@ }, "members":{ "root":{ - "name": "root", + "_name": "root", "tasks": [ { "class":"alert/mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }} ] diff --git a/examples/stress.json b/examples/stress.json index 11535c5..6d1aa90 100644 --- a/examples/stress.json +++ b/examples/stress.json @@ -10,7 +10,7 @@ }, "members":{ "hanez":{ - "name": "admin", + "_name": "admin", "tasks": [ { "class":"alert/mail", "type": "error", "args": { "_rcpt": "hanez@linspector.org" }} ] diff --git a/linspector/config/members.py b/linspector/config/members.py index 694bf5a..2009fbd 100644 --- a/linspector/config/members.py +++ b/linspector/config/members.py @@ -36,12 +36,12 @@ class MemberMissingArgumentException(MemberException): class Member: - def __init__(self, _name, **kwargs): - self.name = _name + def __init__(self, name, **kwargs): + self.name = name tmp = "tasks" self.__tasks = [] if not tmp in kwargs: - raise MemberMissingArgumentException(tmp, _name) + raise MemberMissingArgumentException(tmp, name) self.add_tasks(kwargs[tmp]) def __add_internal(self, l, item):