fix: Dynamic summary spacing
This commit is contained in:
parent
26387401b3
commit
ff1f1e755d
1 changed files with 5 additions and 1 deletions
|
|
@ -302,8 +302,12 @@ class BackupGenerator:
|
|||
backup_summary = self.get_summary()
|
||||
print("Backup Summary for {0} at {1}".format(frappe.local.site, now()))
|
||||
|
||||
title = max([len(x) for x in backup_summary])
|
||||
path = max([len(x["path"]) for x in backup_summary.values()])
|
||||
|
||||
for _type, info in backup_summary.items():
|
||||
print("{0:8}: {1:85} {2}".format(_type.title(), info["path"], info["size"]))
|
||||
template = "{{0:{0}}}: {{1:{1}}} {{2}}".format(title, path)
|
||||
print(template.format(_type.title(), info["path"], info["size"]))
|
||||
|
||||
def backup_files(self):
|
||||
import subprocess
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue