[Mpuls-commits] r2694 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 7 17:38:08 CEST 2010


Author: bh
Date: 2010-05-07 17:38:05 +0200 (Fri, 07 May 2010)
New Revision: 2694

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/export.py
Log:
* mpulsweb/lib/export.py (to_str): Only convert to unicode if a
string is is not already a unicode object.  Fixes wald issue #1497


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-05-07 14:24:50 UTC (rev 2693)
+++ wasko/branches/2.0/ChangeLog	2010-05-07 15:38:05 UTC (rev 2694)
@@ -1,3 +1,8 @@
+2010-05-07  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/lib/export.py (to_str): Only convert to unicode if a
+	string is is not already a unicode object.  Fixes wald issue #1497
+
 2010-05-07  Roland Geider <roland.geider at intevation.de>
 
 	* jmdweb/public/xml/eval_zielgruppe.xml: Update duration analysis

Modified: wasko/branches/2.0/mpulsweb/lib/export.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/export.py	2010-05-07 14:24:50 UTC (rev 2693)
+++ wasko/branches/2.0/mpulsweb/lib/export.py	2010-05-07 15:38:05 UTC (rev 2694)
@@ -37,7 +37,8 @@
     if t in (IntType, LongType):
         return x
     if t in StringTypes:
-        x = unicode(str(x), "utf-8")
+        if not isinstance(x, unicode):
+            x = unicode(x, "utf-8")
         if len(x) > 32765:
             x = x[:32765]
         return x



More information about the Mpuls-commits mailing list