|
From: <ni...@us...> - 2010-11-15 07:26:27
|
Revision: 128
http://openautomation.svn.sourceforge.net/openautomation/?rev=128&view=rev
Author: nilss1
Date: 2010-11-15 07:26:16 +0000 (Mon, 15 Nov 2010)
Log Message:
-----------
use N: instead of lastupdate time to avoid illegal attempt to update error
Modified Paths:
--------------
PyWireGate/trunk/rrd_connector/RRD_Connector.py
Modified: PyWireGate/trunk/rrd_connector/RRD_Connector.py
===================================================================
--- PyWireGate/trunk/rrd_connector/RRD_Connector.py 2010-11-14 23:39:30 UTC (rev 127)
+++ PyWireGate/trunk/rrd_connector/RRD_Connector.py 2010-11-15 07:26:16 UTC (rev 128)
@@ -57,12 +57,12 @@
rrdfilename = self.config['path'] +"/"+ self.makeASCII.sub("_",(str(dsobj.id)))+".rrd"
if not os.path.exists(rrdfilename):
self.create(dsobj,rrdfilename)
- val, utime = dsobj.getValue('lastupdate')
+ val = dsobj.getValue()
if val == None or type(val) not in (int,float):
val = "U"
else:
val = "%.2f" % val
- val = "%d:%s" % (utime,val)
+ val = "N:%s" % val
self.debug("set RRD %s VAL: %r" % (rrdfilename,val))
rrdtool.update(rrdfilename,val)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|