|
From: <ni...@us...> - 2010-11-10 14:34:34
|
Revision: 99
http://openautomation.svn.sourceforge.net/openautomation/?rev=99&view=rev
Author: nilss1
Date: 2010-11-10 14:34:28 +0000 (Wed, 10 Nov 2010)
Log Message:
-----------
Changed datastore save to shutdown
Modified Paths:
--------------
PyWireGate/trunk/WireGate.py
PyWireGate/trunk/datastore.py
Modified: PyWireGate/trunk/WireGate.py
===================================================================
--- PyWireGate/trunk/WireGate.py 2010-11-10 13:46:13 UTC (rev 98)
+++ PyWireGate/trunk/WireGate.py 2010-11-10 14:34:28 UTC (rev 99)
@@ -191,18 +191,20 @@
pass
## now save Datastore
- self.DATASTORE.save()
+ self.DATASTORE.shutdown()
## Handle Errors
def errorlog(self,msg=False):
- exc_type, exc_value, exc_traceback = sys.exc_info()
- tback = traceback.extract_tb(exc_traceback)
- #type(self.ErrorLOGGER)
- #print tback
- #print exc_type, exc_value
+ try:
+ exc_type, exc_value, exc_traceback = sys.exc_info()
+ tback = traceback.extract_tb(exc_traceback)
+ except:
+ exc_value = ""
+ exc_type = ""
+ tback = ""
+ pass
if msg:
- #print repr(msg)
self.ErrorLOGGER.error(repr(msg))
errmsg = "%r %r %r" % (exc_type, exc_value,tback)
self.ErrorLOGGER.error(errmsg)
Modified: PyWireGate/trunk/datastore.py
===================================================================
--- PyWireGate/trunk/datastore.py 2010-11-10 13:46:13 UTC (rev 98)
+++ PyWireGate/trunk/datastore.py 2010-11-10 14:34:28 UTC (rev 99)
@@ -141,7 +141,8 @@
dbfile.write(utfdb)
dbfile.close()
-
+ def shutdown(self):
+ self.save()
def debug(self,msg):
####################################################
@@ -240,4 +241,4 @@
## release lock
self.read_mutex.release()
-
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|