[Lldb-commits] [lldb] r156115 - /lldb/trunk/examples/python/crashlog.py

Johnny Chen johnny.chen at apple.com
Thu May 3 15:31:31 PDT 2012


Author: johnny
Date: Thu May  3 17:31:30 2012
New Revision: 156115

URL: http://llvm.org/viewvc/llvm-project?rev=156115&view=rev
Log:
Fix the following error when importing crashlog.py from a Python interactive session:

    AttributeError: 'module' object has no attribute 'debugger'

Modified:
    lldb/trunk/examples/python/crashlog.py

Modified: lldb/trunk/examples/python/crashlog.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/examples/python/crashlog.py?rev=156115&r1=156114&r2=156115&view=diff
==============================================================================
--- lldb/trunk/examples/python/crashlog.py (original)
+++ lldb/trunk/examples/python/crashlog.py Thu May  3 17:31:30 2012
@@ -469,7 +469,7 @@
     # Create a new debugger instance
     lldb.debugger = lldb.SBDebugger.Create()
     SymbolicateCrashLog (sys.argv[1:])
-elif lldb.debugger:
+elif getattr(lldb, 'debugger', None):
     lldb.debugger.HandleCommand('command script add -f lldb.macosx.crashlog.Symbolicate crashlog')
     print '"crashlog" command installed, type "crashlog --help" for detailed help'
 





More information about the lldb-commits mailing list