126 else: |
127 else: |
127 def check_and_set(cfg, field, loc, defa, fn): |
128 def check_and_set(cfg, field, loc, defa, fn): |
128 cfg[field]=fn(cfg, field, field, loc, defa[field]) |
129 cfg[field]=fn(cfg, field, field, loc, defa[field]) |
129 return cfg |
130 return cfg |
130 |
131 |
|
132 def check_parameters(cmd): |
|
133 settings['borg']=check_and_set(settings['borg'], cmd+'_parameters', |
|
134 'borg', defaults['borg'], |
|
135 check_list_of_dicts) |
|
136 |
131 settings['borg']=check_and_set(settings['borg'], 'executable', 'borg', |
137 settings['borg']=check_and_set(settings['borg'], 'executable', 'borg', |
132 defaults['borg'], check_string) |
138 defaults['borg'], check_string) |
133 |
139 |
134 settings['borg']=check_and_set(settings['borg'], 'common_parameters', 'borg', |
140 check_parameters('common') |
135 defaults['borg'], check_list_of_dicts) |
141 check_parameters('create') |
|
142 check_parameters('prune') |
136 |
143 |
137 settings['borg']=check_and_set(settings['borg'], 'create_parameters', 'borg', |
|
138 defaults['borg'], check_list_of_dicts) |
|
139 |
144 |