Commit 071d98cd authored by David Adam's avatar David Adam
Browse files

make output prettier

parent cdb6c7ca
......@@ -10,6 +10,7 @@ concurrent_num = 0
duration_to_keep = '4W'
from multiprocessing import Pool
from time import strftime
import subprocess, os, glob
run_rdiff = lambda *args: subprocess.check_output(('/usr/bin/rdiff-backup',) + args, stderr=subprocess.STDOUT).decode('utf-8')
......@@ -88,8 +89,26 @@ if __name__ == '__main__':
pool.close()
pool.join()
for host, r in results.items():
print("Backup results for", host)
print(r.get()['output'])
print('-' * 40)
divider = '-' * 76
# Header
print(divider)
print('RDIFF-MANAGER REPORT for run started', strftime('%c'))
print(divider)
# Summary
print()
print('SUMMARY:')
print()
for k, v in results.items():
if v.get()['success']:
print(' Backup succeeded for', k)
else:
print(' Backup FAILED for', k)
print()
for k, v in results.items():
print(divider)
print("Backup results for", k)
print()
print(v.get()['output'])
print()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment