Only get the script interpreter if we find scripting resources in the symbol file. This helps us avoid initializing python when it isn't needed.

llvm-svn: 177793
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 2341144..822fbd8 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -1196,15 +1196,15 @@
             return false;
         }
 
-        ScriptInterpreter *script_interpreter = debugger.GetCommandInterpreter().GetScriptInterpreter();
-        if (script_interpreter)
+        FileSpecList file_specs = platform_sp->LocateExecutableScriptingResources (target,
+                                                                                   *this);
+        
+        
+        const uint32_t num_specs = file_specs.GetSize();
+        if (num_specs)
         {
-            FileSpecList file_specs = platform_sp->LocateExecutableScriptingResources (target,
-                                                                                       *this);
-            
-            
-            const uint32_t num_specs = file_specs.GetSize();
-            if (num_specs)
+            ScriptInterpreter *script_interpreter = debugger.GetCommandInterpreter().GetScriptInterpreter();
+            if (script_interpreter)
             {
                 for (uint32_t i=0; i<num_specs; ++i)
                 {
@@ -1222,11 +1222,11 @@
                     }
                 }
             }
-        }
-        else
-        {
-            error.SetErrorString("invalid ScriptInterpreter");
-            return false;
+            else
+            {
+                error.SetErrorString("invalid ScriptInterpreter");
+                return false;
+            }
         }
     }
     return true;