def read_user_config(path):
 if (not path):
  return {}
 config_path = os.path.join(path, 'config')
 if (not os.path.exists(config_path)):
  return {}
 try:
  with open(config_path, 'r') as f:
   data = f.read()
  result = json.loads(data)
 except:
  print_msg('Warning: Cannot read config file.', config_path)
  return {}
 if (not (type(result) is dict)):
  return {}
 return result

def read_user_config ( path ) : if ( not path ) : return { } config_path = os . path . join ( path , 'config' ) if ( not os . path . exists ( config_path ) ) : return { } try : with open ( config_path , 'r' ) as f : data = f . read ( ) result = json . loads ( data ) except : print_msg ( 'Warning: Cannot read config file.' , config_path ) return { } if ( not ( type ( result ) is dict ) ) : return { } return result
parse and store the user config settings in electrum .