adding option --csv-del

This commit is contained in:
Miroslav Stampar
2011-11-30 17:39:41 +00:00
parent 02bd9a54f3
commit 71c46f50aa
7 changed files with 24 additions and 19 deletions

View File

@@ -79,7 +79,6 @@ from lib.core.settings import DEFAULT_GET_POST_DELIMITER
from lib.core.settings import INFERENCE_UNKNOWN_CHAR
from lib.core.settings import UNICODE_ENCODING
from lib.core.settings import DBMS_DICT
from lib.core.settings import DEFAULT_CSV_DELIMITER
from lib.core.settings import DESCRIPTION
from lib.core.settings import DUMMY_SQL_INJECTION_CHARS
from lib.core.settings import IS_WIN
@@ -2989,7 +2988,7 @@ def safeCSValue(value):
if retVal and isinstance(retVal, basestring):
if not (retVal[0] == retVal[-1] == '"'):
if any(map(lambda x: x in retVal, [DEFAULT_CSV_DELIMITER, '"', '\n'])):
if any(map(lambda x: x in retVal, [conf.csvDel, '"', '\n'])):
retVal = '"%s"' % retVal.replace('"', '""')
return retVal