Browse Source

Merge JoinMarket-Org/joinmarket-clientserver#1583: Replace readfp

438cb41c23 Replace readfp() (roshii)

Pull request description:

  Replace `ConfigParser.readfp()` with `ConfigParser.read_file()`  as per Python [docs](https://docs.python.org/3/library/configparser.html?highlight=configparser#configparser.ConfigParser.read_file)

  The latter is available as from Python v3.2 while the former breaks as from v3.12

ACKs for top commit:
  kristapsk:
    ACK 438cb41c23

Tree-SHA512: 9f0c7b35a8410a49f4c7486d25535e8f4e47cc40f794c1e83d8b8ee070aa55fcf5a8e6424fd6ebf09c9978bd4e6259c9f26e7d17e2cac55745725bf44cd97917
master
Kristaps Kaupe 2 years ago
parent
commit
c00803d17d
No known key found for this signature in database
GPG Key ID: 33E472FE870C7E5D
  1. 2
      src/jmclient/configure.py

2
src/jmclient/configure.py

@ -702,7 +702,7 @@ def _remove_unwanted_default_settings(config: ConfigParser) -> None:
def load_program_config(config_path: str = "", bs: Optional[str] = None,
plugin_services: List[JMPluginService] = []) -> None:
global_singleton.config.readfp(io.StringIO(defaultconfig))
global_singleton.config.read_file(io.StringIO(defaultconfig))
if not config_path:
config_path = lookup_appdata_folder(global_singleton.APPNAME)
# we set the global home directory, but keep the config_path variable

Loading…
Cancel
Save