def _load_config():
 config = {}
 if os.path.isfile('/usbkey/config'):
  with salt.utils.fopen('/usbkey/config', 'r') as config_file:
   for optval in config_file:
    if (optval[0] == '#'):
     continue
    if ('=' not in optval):
     continue
    optval = optval.split('=')
    config[optval[0].lower()] = optval[1].strip().strip('"')
 log.debug('smartos.config - read /usbkey/config: {0}'.format(config))
 return config

def _load_config ( ) : config = { } if os . path . isfile ( '/usbkey/config' ) : with salt . utils . fopen ( '/usbkey/config' , 'r' ) as config_file : for optval in config_file : if ( optval [ 0 ] == '#' ) : continue if ( '=' not in optval ) : continue optval = optval . split ( '=' ) config [ optval [ 0 ] . lower ( ) ] = optval [ 1 ] . strip ( ) . strip ( '"' ) log . debug ( 'smartos.config - read /usbkey/config: {0}' . format ( config ) ) return config
safely load a config file .