From e9a4a52755df86056b151f0a19f21d8bfdcbd007 Mon Sep 17 00:00:00 2001 From: tgoff0 Date: Mon, 9 Mar 2015 15:21:16 +0000 Subject: [PATCH] daemon: Make Configurable.valueof() a class method. --- daemon/core/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/daemon/core/conf.py b/daemon/core/conf.py index 6b9bdf0a..b7b38451 100644 --- a/daemon/core/conf.py +++ b/daemon/core/conf.py @@ -337,14 +337,14 @@ class Configurable(object): return 0 return value - - def valueof(self, name, values): + @classmethod + def valueof(cls, name, values): ''' Helper to return a value by the name defined in confmatrix. Checks if it is boolean''' - i = self.getnames().index(name) - if self._confmatrix[i][1] == coreapi.CONF_DATA_TYPE_BOOL and \ + i = cls.getnames().index(name) + if cls._confmatrix[i][1] == coreapi.CONF_DATA_TYPE_BOOL and \ values[i] != "": - return self.booltooffon( values[i] ) + return cls.booltooffon(values[i]) else: return values[i]