# HG changeset patch # User Jeff Hammel # Date 1628892099 25200 # Node ID 4d950a47f96b6d41ae34461f8ba5384e5498a555 # Parent b19b605b5b29503bf2cfb9dc23c4673f6ab2c5ed stub ini2dict martINI replacement diff -r b19b605b5b29 -r 4d950a47f96b silvermirror/unify.py --- a/silvermirror/unify.py Fri Aug 13 14:55:38 2021 -0700 +++ b/silvermirror/unify.py Fri Aug 13 15:01:39 2021 -0700 @@ -5,6 +5,7 @@ """ import argparse +import configparser import getpass import json import os @@ -23,10 +24,17 @@ raise NotImplementedError('Need to specify a config file, like\n~/.silvermirror') +def ini2dict(filename): + config = configparser.ConfigParser() + config.read(filename) + for section in config.sections(): + raise NotImplementedError('TODO') + def read_config(filename): """read configuration `filename`""" - config = ConfigMunger(filename).dict() + # config = ConfigMunger(filename).dict() + config = ini2dict(filename) ### main configuration main = config.pop('::SilverMirror::', {})