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

release builds of Python.
This commit is contained in:
Armin Rigo 2006-05-28 22:07:08 +00:00
parent 5f6861df93
commit a6123abb72

View file

@ -513,6 +513,9 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
else:
cfp = cStringIO.StringIO()
if huntrleaks:
if not hasattr(sys, 'gettotalrefcount'):
raise Exception("Tracking reference leaks requires a debug build "
"of Python")
refrep = open(huntrleaks[2], "a")
try:
save_stdout = sys.stdout