replace label presence condition with get method
This commit is contained in:
parent
9f2facad9d
commit
b67f729c7c
|
@ -283,14 +283,10 @@ def run_actions(
|
|||
'''
|
||||
add_custom_log_levels()
|
||||
repository_path = os.path.expanduser(repository['path'])
|
||||
if 'label' in repository:
|
||||
repository_label = repository['label']
|
||||
else:
|
||||
repository_label = ''
|
||||
global_arguments = arguments['global']
|
||||
dry_run_label = ' (dry run; not making any changes)' if global_arguments.dry_run else ''
|
||||
hook_context = {
|
||||
'label': repository_label,
|
||||
'label': repository.get('label', ''),
|
||||
'repository': repository_path,
|
||||
# Deprecated: For backwards compatibility with borgmatic < 1.6.0.
|
||||
'repositories': ','.join([repo['path'] for repo in config['repositories']]),
|
||||
|
|
Loading…
Reference in New Issue
Block a user