Actions
Feature #12822
closedmore specific about config file behavior
Start date:
06/06/2022
Due date:
% Done:
0%
Estimated time:
Deliverable:
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
Updated by Anchi Cheng about 2 years ago
- Description updated (diff)
- Status changed from New to Assigned
Updated by Anchi Cheng about 2 years ago
- 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'}}
Actions