Mercurial > hg > silvermirror
comparison silvermirror/unify.py @ 40:d081ca2e8696
py35
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 15:02:50 -0800 |
parents | e86d475435ee |
children | 7d28efc8dfa1 |
comparison
equal
deleted
inserted
replaced
39:9e21b4fbd8b3 | 40:d081ca2e8696 |
---|---|
11 import subprocess | 11 import subprocess |
12 import sys | 12 import sys |
13 from martini.config import ConfigMunger | 13 from martini.config import ConfigMunger |
14 from pkg_resources import iter_entry_points | 14 from pkg_resources import iter_entry_points |
15 from pprint import pprint | 15 from pprint import pprint |
16 from utils import home | 16 from .utils import home |
17 from utils import ip_addresses | 17 from .utils import ip_addresses |
18 | |
18 | 19 |
19 def make_config(filename): | 20 def make_config(filename): |
20 # XXX needed? | 21 # XXX needed? |
21 raise NotImplementedError('Need to specify a config file, like\n~/.silvermirror') | 22 raise NotImplementedError('Need to specify a config file, like\n~/.silvermirror') |
22 | 23 |
23 | 24 |
24 def read_config(filename): | 25 def read_config(filename): |
26 """read configuration `filename`""" | |
27 | |
25 config = ConfigMunger(filename).dict() | 28 config = ConfigMunger(filename).dict() |
26 | 29 |
27 ### main configuration | 30 ### main configuration |
28 main = config.pop('::SilverMirror::', {}) | 31 main = config.pop('::SilverMirror::', {}) |
29 if not main.get('basedir'): | 32 if not main.get('basedir'): |