Change the process iteration pattern to a more concise:

for thread in process:
        print >> output, print_stacktrace(thread, string_buffer=True)

llvm-svn: 130940
This commit is contained in:
Johnny Chen 2011-05-05 18:50:56 +00:00
parent 7db91cefb2
commit ae9639aeb3
1 changed files with 2 additions and 2 deletions

View File

@ -399,8 +399,8 @@ def print_stacktraces(process, string_buffer = False):
print >> output, "Stack traces for " + repr(process)
for i in range(process.GetNumThreads()):
print >> output, print_stacktrace(process.GetThreadAtIndex(i), string_buffer=True)
for thread in process:
print >> output, print_stacktrace(thread, string_buffer=True)
if string_buffer:
return output.getvalue()