Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ddfec1c

Browse files
committed
Initial patch for an Issue #846
1 parent 2f37fb2 commit ddfec1c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1542,7 +1542,7 @@ def safeStringFormat(format_, params):
15421542
while True:
15431543
match = re.search(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", retVal)
15441544
if match:
1545-
if count > len(params):
1545+
if count >= len(params):
15461546
raise Exception("wrong number of parameters during string formatting")
15471547
else:
15481548
retVal = re.sub(r"(\A|[^A-Za-z0-9])(%s)([^A-Za-z0-9]|\Z)", r"\g<1>%s\g<3>" % params[count], retVal, 1)

0 commit comments

Comments
 (0)