|
From: <ni...@us...> - 2010-11-11 15:56:08
|
Revision: 109
http://openautomation.svn.sourceforge.net/openautomation/?rev=109&view=rev
Author: nilss1
Date: 2010-11-11 15:56:02 +0000 (Thu, 11 Nov 2010)
Log Message:
-----------
Fix date in DPT_Types.py * Fix parent error for DSupdate in datastore.py * change print to debug in scheduler.py
Modified Paths:
--------------
PyWireGate/trunk/datastore.py
PyWireGate/trunk/knx_connector/DPT_Types.py
PyWireGate/trunk/scheduler.py
Modified: PyWireGate/trunk/datastore.py
===================================================================
--- PyWireGate/trunk/datastore.py 2010-11-11 14:49:01 UTC (rev 108)
+++ PyWireGate/trunk/datastore.py 2010-11-11 15:56:02 UTC (rev 109)
@@ -193,7 +193,8 @@
class dataObject:
def __init__(self,parent,id,name=False):
self._parent = parent
- self.WG = parent.WG
+ if parent:
+ self.WG = parent.WG
## Threadlocking
self.write_mutex = threading.RLock()
Modified: PyWireGate/trunk/knx_connector/DPT_Types.py
===================================================================
--- PyWireGate/trunk/knx_connector/DPT_Types.py 2010-11-11 14:49:01 UTC (rev 108)
+++ PyWireGate/trunk/knx_connector/DPT_Types.py 2010-11-11 15:56:02 UTC (rev 109)
@@ -361,9 +361,11 @@
def encodeDPT11(self,val):
## make time struct accesible
+ utime=[]
if type(val) in [float, int]:
- utime = [v for v in time.localtime(tval)]
- else:
+ if val > 0:
+ utime = [v for v in time.localtime(val)]
+ if utime == []:
utime = [v for v in time.localtime()]
if type(val) == str:
Modified: PyWireGate/trunk/scheduler.py
===================================================================
--- PyWireGate/trunk/scheduler.py 2010-11-11 14:49:01 UTC (rev 108)
+++ PyWireGate/trunk/scheduler.py 2010-11-11 15:56:02 UTC (rev 109)
@@ -47,12 +47,12 @@
for uoption in obj.config['cron'].keys():
kwargs[str(uoption)] = str(obj.config['cron'][uoption])
- print "Adding %s - %r" % (shed,obj)
+ self.debug("Adding %s - %r" % (shed,obj))
setattr(obj.sendConnected.im_func,'__name__',"%s" % shed.encode('UTF-8'))
self.SCHEDULER.add_cron_job(self.WG.DATASTORE.dataobjects[shed].sendConnected,**kwargs)
def shutdown(self):
- print self.SCHEDULER.dump_jobs()
+ self.debug("shutdown Scheduler\n%s" % self.SCHEDULER.dump_jobs())
self.SCHEDULER.shutdown()
def debug(self,msg):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|