Proper fix for #1053

This commit is contained in:
Miroslav Stampar committed 2014-12-19 09:26:01 +01:00
1 parent 6972020faf
commit cf3b02ee04
2 files changed
+6 -5

No files matched your search

+2 -2
View File
@@ -1564,8 +1564,8 @@ def safeStringFormat(format_, params):
"""
Avoids problems with inappropriate string format strings
>>> safeStringFormat('foobar%d%s', ('1', 2))
u'foobar12'
>>> safeStringFormat('SELECT foo FROM %s LIMIT %d', ('bar', '1'))
u'SELECT foo FROM bar LIMIT 1'
"""
if format_.count(PAYLOAD_DELIMITER) == 2: