Merge pull request #386 fix conflict
authorElizaveta Shashkova <Elizaveta.Shashkova@jetbrains.com>
Wed, 11 May 2016 11:48:01 +0000 (14:48 +0300)
committerElizaveta Shashkova <Elizaveta.Shashkova@jetbrains.com>
Wed, 11 May 2016 11:48:01 +0000 (14:48 +0300)
1  2 
python/src/com/jetbrains/python/debugger/PyDebugRunner.java

index 9792c06af3a5c486a593a3e6fcc65e6f7a02ca00,69322272a41569b8b58513189030902e5344255b..24c225e838a42f2fbc3c851b94cf743b2298bebe
@@@ -357,14 -362,11 +363,14 @@@ public class PyDebugRunner extends Gene
        final RunConfiguration configuration = selectedConfiguration.getConfiguration();
        if (configuration instanceof AbstractPythonRunConfiguration) {
          AbstractPythonRunConfiguration runConfiguration = (AbstractPythonRunConfiguration)configuration;
 -        List<String> roots = Lists.newArrayList();
 -        for (VirtualFile contentRoot : runConfiguration.getSdk().getSdkModificator().getRoots(OrderRootType.CLASSES)) {
 -          roots.add(contentRoot.getPath());
 +        final Sdk sdk = runConfiguration.getSdk();
 +        if (sdk != null) {
 +          List<String> roots = Lists.newArrayList();
 +          for (VirtualFile contentRoot : sdk.getSdkModificator().getRoots(OrderRootType.CLASSES)) {
 +            roots.add(contentRoot.getPath());
 +          }
-           commandLine.getEnvironment().put(LIBRARY_ROOTS, StringUtil.join(roots, File.pathSeparator));
++          environment.put(LIBRARY_ROOTS, StringUtil.join(roots, File.pathSeparator));
          }
 -        environment.put(LIBRARY_ROOTS, StringUtil.join(roots, File.pathSeparator));
        }
      }
    }