Commit a6123abb authored by Armin Rigo's avatar Armin Rigo

A clearer error message when passing -R to regrtest.py with

release builds of Python.
parent 5f6861df
...@@ -513,6 +513,9 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False): ...@@ -513,6 +513,9 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
else: else:
cfp = cStringIO.StringIO() cfp = cStringIO.StringIO()
if huntrleaks: if huntrleaks:
if not hasattr(sys, 'gettotalrefcount'):
raise Exception("Tracking reference leaks requires a debug build "
"of Python")
refrep = open(huntrleaks[2], "a") refrep = open(huntrleaks[2], "a")
try: try:
save_stdout = sys.stdout save_stdout = sys.stdout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment