Fix problems with unknown extra conf at ycmd start

Fixes #579.
This commit is contained in:
Strahinja Val Markovic 2013-10-10 11:32:20 -07:00
parent 8ce07f508c
commit 7a73eb14d8

View File

@ -79,7 +79,11 @@ def _CallExtraConfMethod( function_name ):
vim_current_working_directory = os.getcwd() vim_current_working_directory = os.getcwd()
path_to_dummy = os.path.join( vim_current_working_directory, 'DUMMY_FILE' ) path_to_dummy = os.path.join( vim_current_working_directory, 'DUMMY_FILE' )
# The dummy file in the Vim CWD ensures we find the correct extra conf file # The dummy file in the Vim CWD ensures we find the correct extra conf file
try:
module = ModuleForSourceFile( path_to_dummy ) module = ModuleForSourceFile( path_to_dummy )
except UnknownExtraConf:
return
if not module or not hasattr( module, function_name ): if not module or not hasattr( module, function_name ):
return return
getattr( module, function_name )() getattr( module, function_name )()