Fix the following error when importing crashlog.py from a Python interactive session:
AttributeError: 'module' object has no attribute 'debugger'
llvm-svn: 156115
diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py
index 7023137..826b15c 100755
--- a/lldb/examples/python/crashlog.py
+++ b/lldb/examples/python/crashlog.py
@@ -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'