]> git.parisson.com Git - timeside.git/commitdiff
timeside/analyzer/core.py: add AnalyzerResult class
authorPaul Brossier <piem@piem.org>
Sun, 14 Apr 2013 03:34:37 +0000 (22:34 -0500)
committerPaul Brossier <piem@piem.org>
Sun, 14 Apr 2013 03:34:37 +0000 (22:34 -0500)
timeside/analyzer/core.py

index cbb9a17143cc3f409465d94636a5f3728da9626a..ec60570bcfcb644109a985a7e89d571dff178802 100644 (file)
 # Authors:
 #   Guillaume Pellerin <yomguy at parisson.com>
 
-pass
-
-
+class AnalyzerResult(object):
+
+    def __init__(self, id = "", name = "", unit = "s", value = None):
+        self.id = id
+        self.name = name
+        self.unit = unit
+        self.value = value
+
+    def __repr__(self):
+        o = {}
+        for attr in ['id', 'name', 'unit', 'value']:
+            o[attr] = getattr(self, attr)
+        return repr(o)