diff options
author | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2010-02-09 14:32:10 (GMT) |
---|---|---|
committer | Jedrzej Nowacki <jedrzej.nowacki@nokia.com> | 2010-02-10 08:54:56 (GMT) |
commit | 8c8aabdfac1518f9d62097ea5c80cea3d50131a3 (patch) | |
tree | 18088ecb6db73490d5810391f8c3fd36b4354ec2 /tests | |
parent | 3930b896eba50eb657c88923b2922a2fba0d6385 (diff) | |
download | Qt-8c8aabdfac1518f9d62097ea5c80cea3d50131a3.zip Qt-8c8aabdfac1518f9d62097ea5c80cea3d50131a3.tar.gz Qt-8c8aabdfac1518f9d62097ea5c80cea3d50131a3.tar.bz2 |
Fix an unhandled exception in QScriptValue's test generator.
$QT_END_LICENSE was interpreted as a template key by Template() object,
causing substitute() call to throw a KeyError exception.
The bug was introduced in 9962e2d96a212c518054220167eb6f61e1052bcc.
Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/auto/qscriptvalue/testgen/gen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qscriptvalue/testgen/gen.py b/tests/auto/qscriptvalue/testgen/gen.py index 7161e6b..b3c81b9 100755 --- a/tests/auto/qscriptvalue/testgen/gen.py +++ b/tests/auto/qscriptvalue/testgen/gen.py @@ -231,7 +231,7 @@ if __name__ == '__main__': row_esc = escape(row) out.append(qsvTempl.substitute(expr = row, expr_esc = row_esc)) - result = mainTempl.substitute(dump= "".join(out) \ + result = mainTempl.safe_substitute(dump= "".join(out) \ , values = (11 * ' ' + '<< ').join(qsv) \ , count = len(qsv) \ , dataTags = (11 * ' ' + '<< ').join(map(lambda w: '"' + escape(w.replace('\n','')) + '"\n', qsv))) |