#NEWLINE# def lookup_invalid_config_setting( self , setting ) : #NEWLINE# #INDENT# setting_key = setting . split ( ':' ) [ ( - 1 ) ] #NEWLINE# with open ( self . machine . config [ 'mpf' ] [ 'config_versions_file' ] , 'r' ) as f : #NEWLINE# #INDENT# config_file = yaml . load ( f ) #NEWLINE# #UNINDENT# for ( ver , sections ) in config_file . iteritems ( ) : #NEWLINE# #INDENT# if ( type ( ver ) is not int ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ver_string = '' #NEWLINE# if ( int ( version . __config_version_info__ ) > int ( ver ) ) : #NEWLINE# #INDENT# ver_string = ( ( ' (The latest config version is config_version=' + version . __config_version_info__ ) + ').' ) #NEWLINE# #UNINDENT# if ( setting_key in sections [ 'section_replacements' ] ) : #NEWLINE# #INDENT# self . log . info ( 'The setting "%s" has been renamed to "%s" in config_version=%s%s' , f , sections [ 'section_replacements' ] [ setting_key ] , ver , ver_string ) #NEWLINE# #UNINDENT# if ( setting_key in sections [ 'section_deprecations' ] ) : #NEWLINE# #INDENT# self . log . info ( 'The setting "%s" has been removed in config_version=%s%s' , setting , ver , ver_string ) #NEWLINE# #UNINDENT# #UNINDENT# if ( setting in config_file [ 'custom_messages' ] ) : #NEWLINE# #INDENT# self . log . info ( config_file [ 'custom_messages' ] [ setting ] )