Feature #12822
closed
more specific about config file behavior
Added by Anchi Cheng over 2 years ago.
Updated about 2 years ago.
Description
combine=True means sections in the four possible paths are separately used so [global] can be set in different level from [local]. Used in leginon.cfg, leginon_session.cfg and sinedon.cfg.
combine=False means only the last existing config path will be loaded. Used in instruments.cfg and pyami.cfg
- Description updated (diff)
- Description updated (diff)
- Status changed from New to Assigned
- Description updated (diff)
Usage example:
/etc/mami/leginon_session.cfg contains application name prefix definition
[app]
prefix: Krios
environment variable LEGINON_CFG_PATH=/home/anchi/test
/home/anchi/test/leginon_session.cfg contains session name prefix definition
[name]
prefix: 1k
The result can be tested with this python command sequence
from pyami import moduleconfig
moduleconfig.getConfigured(config_file='leginon_session.cfg', package='leginon', combined=True)
This should return
{'name':{prefix:'1k'},'app':{prefix:'Krios'}}
- Status changed from Assigned to Closed
Also available in: Atom
PDF