[Greater-commits] r401 - trunk/GREAT-ER-DB/tools

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jul 11 12:56:51 CEST 2011


Author: aheinecke
Date: 2011-07-11 12:56:51 +0200 (Mon, 11 Jul 2011)
New Revision: 401

Modified:
   trunk/GREAT-ER-DB/tools/export_blobs.py
Log:
Replace ' in strings to avoid escaping problems


Modified: trunk/GREAT-ER-DB/tools/export_blobs.py
===================================================================
--- trunk/GREAT-ER-DB/tools/export_blobs.py	2011-07-11 10:24:03 UTC (rev 400)
+++ trunk/GREAT-ER-DB/tools/export_blobs.py	2011-07-11 10:56:51 UTC (rev 401)
@@ -23,7 +23,7 @@
     if isinstance(obj, int) or isinstance(obj, long):
         return "%d" % obj
     if isinstance(obj, str):
-        return "'%s'" % obj
+        return "'%s'" % obj.replace("'","\'")
     else:
         return "NULL"
 



More information about the Greater-commits mailing list