From 96e8dd7b45309d0db76b19c1ce636259d95a6da6 Mon Sep 17 00:00:00 2001 From: Jeremy Carbaugh Date: Tue, 9 Mar 2010 10:49:55 -0500 Subject: [PATCH] do not quote non-string values --- saucebrush/emitters.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/saucebrush/emitters.py b/saucebrush/emitters.py index d965b49..9294bc4 100644 --- a/saucebrush/emitters.py +++ b/saucebrush/emitters.py @@ -137,6 +137,8 @@ class SqlDumpEmitter(Emitter): table_name, '`,`'.join(fieldnames)) def quote(self, item): + if not isinstance(item, ('unicode','str')): + return "%s" % item item = item.replace("\\","\\\\").replace("'","\\'").replace(chr(0),'0') return "'%s'" % item