|
From: <ni...@us...> - 2010-11-04 21:54:19
|
Revision: 78
http://openautomation.svn.sourceforge.net/openautomation/?rev=78&view=rev
Author: nilss1
Date: 2010-11-04 21:54:13 +0000 (Thu, 04 Nov 2010)
Log Message:
-----------
added Warning when non Unicode Data ist set by a connector
Modified Paths:
--------------
PyWireGate/trunk/datastore.py
Modified: PyWireGate/trunk/datastore.py
===================================================================
--- PyWireGate/trunk/datastore.py 2010-11-04 21:50:46 UTC (rev 77)
+++ PyWireGate/trunk/datastore.py 2010-11-04 21:54:13 UTC (rev 78)
@@ -208,6 +208,9 @@
self.write_mutex.acquire()
## save the modified time
self.lastupdate = time.time()
+ if type(val) == str:
+ self.WG.log("Non Unicode Value received for %s" % self.id,'warning')
+ val = unicode(val,encoding='iso-8859-15',errors='ignore')
self.value = val
if send:
self._setValue(self)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|