code: def dump_profile(profile):
      '''保存帐户的配置信息.
  
      这里会检查用户是否愿意保存密码, 如果需要保存密码的话, 就调用keyring来存
      放密码.
      但如果密码为空, 就不再存放它了.
      '''
      profile = profile.copy()
      path = os.path.join(Config.CONF_DIR, profile['username'])
      if profile['remember-password'] and profile['password']:
          for i in range(RETRIES):
              try:
                  keyring.set_password(Config.DBUS_APP_NAME, profile['username'],
                                       profile['password'])
                  break
              except dbus.exceptions.DBusException:
                  logger.error(traceback.format_exc())
      profile['password'] = ''
      with open(path, 'w') as fh:
          json.dump(profile, fhf dump_profile(profile):
      '''保存帐户的配置信息.
  
      这里会检查用户是否愿意保存密码, 如果需要保存密码的话, 就调用keyring来存
      放密码.
      但如果密码为空, 就不再存放它了.
      '''
      profile = profile.copy()
      path = os.path.join(Config.CONF_DIR, profile['username'])
      if profile['remember-password'] and profile['password']:
          for i in range(RETRIES):
              try:
                  keyring.set_password(Config.DBUS_APP_NAME, profile['username'],
                                       profile['password'])
                  break
              except dbus.exceptions.DBusException:
                  logger.error(traceback.format_exc())
      profile['password'] = ''
      with open(path, 'w') as fh:
          json.dump(profile, fh)
docs: 保存帐户的配置信息.
  
      这里会检查用户是否愿意保存密码, 如果需要保存密码的话, 就调用keyring来存
      放密码.
      但如果密码为空, 就不再存放它了.