borgmatic/borgmatic/commands/hook.py

8 lines
145 B
Python

import subprocess
def execute_hook(commands):
if commands:
for cmd in commands:
subprocess.check_call(cmd, shell=True)