borgmatic/borgmatic/commands/hook.py

8 lines
145 B
Python
Raw Normal View History

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