Add __repr__ function for sensors objects
This commit is contained in:
parent
7c1df88815
commit
a7af6b2c6e
1 changed files with 3 additions and 0 deletions
|
|
@ -63,6 +63,9 @@ class GaugeSensor(CapBaseObject):
|
|||
history = Field('Value history', list) # lastvalue not included
|
||||
gaugeid = StringField('Id of the gauge')
|
||||
|
||||
def __repr__(self):
|
||||
return "<GaugeSensor id=%s name=%s>" % (self.id, self.name)
|
||||
|
||||
|
||||
class ICapGauge(IBaseCap):
|
||||
def iter_gauges(self, pattern=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue