Просмотр исходного кода

Disable sitecustomize when checking python version

Sitecustomize files can be slow or broken and might hang editor
startup.  Since they aren't necessary for checking the python version,
disable them to get a small speed boost for everyone, and an editor
that doesn't hang indefinitely on startup if the sitecustomize gets
into an infinite loop (due to a bad NFS mount or similar).
Kyle Lippincott 8 лет назад
Родитель
Сommit
b5b2fb57e1
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      python/ycm/paths.py

+ 3 - 0
python/ycm/paths.py

@@ -118,6 +118,9 @@ def IsPythonVersionCorrect( path ):
     return False
     return False
 
 
   command = [ path,
   command = [ path,
+              # Disable site customize. Faster, and less likely to encounter
+              # issues with disconnected mounts (nfs, fuse, etc.)
+              '-S',
               '-c',
               '-c',
               "import sys;"
               "import sys;"
               "major, minor = sys.version_info[ :2 ];"
               "major, minor = sys.version_info[ :2 ];"