Fix the test suite error of:

...

  File "/Volumes/data/lldb/svn/trunk/test/lldbtest.py", line 243, in __init__
    self.session = test.session if test else None
AttributeError: 'StdCXXDisassembleTestCase' object has no attribute 'session'

llvm-svn: 137724
This commit is contained in:
Johnny Chen 2011-08-16 17:06:45 +00:00
parent 45e50d8a0b
commit bfcf37f18b

View File

@ -240,7 +240,7 @@ class recording(StringIO.StringIO):
def __init__(self, test, trace):
"""Create a StringIO instance; record the session obj and trace flag."""
StringIO.StringIO.__init__(self)
self.session = test.session if test else None
self.session = getattr(test, "session", None) if test else None
self.trace = trace
def __enter__(self):