diff options
author | Aron Xu <aron@debian.org> | 2014-07-09 04:01:07 +0800 |
---|---|---|
committer | Aron Xu <aron@debian.org> | 2014-07-09 04:01:07 +0800 |
commit | 7042e17490515a990a45aa7237d11bc49ab0eaf0 (patch) | |
tree | 62b661911406394bbeaca8951d660bb6d8aac0de /python/tests/xpathleak.py | |
parent | 2c8fe012ef1ff6e0613480dd182dec099aa9636e (diff) | |
download | libxml2-7042e17490515a990a45aa7237d11bc49ab0eaf0.tar.gz |
Imported Upstream version 2.8.0+dfsg1
Diffstat (limited to 'python/tests/xpathleak.py')
-rw-r--r--[-rwxr-xr-x] | python/tests/xpathleak.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/python/tests/xpathleak.py b/python/tests/xpathleak.py index 33ab61c..39f49e3 100755..100644 --- a/python/tests/xpathleak.py +++ b/python/tests/xpathleak.py @@ -42,24 +42,24 @@ badexprs = ( for expr in badexprs: try: ctxt.xpathEval(expr) - except libxml2.xpathError: + except libxml2.xpathError, e: pass else: - print("Unexpectedly legal expression:", expr) + print "Unexpectedly legal expression:", expr ctxt.xpathFreeContext() doc.freeDoc() if err != expect: - print("error") - print("received %s" %(err)) - print("expected %s" %(expect)) + print "error" + print "received %s" %(err) + print "expected %s" %(expect) sys.exit(1) libxml2.cleanupParser() leakedbytes = libxml2.debugMemory(True) if leakedbytes == 0: - print("OK") + print "OK" else: - print("Memory leak", leakedbytes, "bytes") + print "Memory leak", leakedbytes, "bytes" # drop file to .memdump file in cwd, but won't work if not compiled in libxml2.dumpMemory() |