diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-05-30 00:22:54 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2011-05-30 00:23:52 +0200 |
commit | aad4e8cc8a04f46fee6f026897dbfcb8bc8f84bf (patch) | |
tree | 391e754347d026ec798c3476edc03087341af1f1 /rystamps.py | |
parent | f8c735d7255e6cbb31930c31dda7282883912908 (diff) | |
download | rybackup-aad4e8cc8a04f46fee6f026897dbfcb8bc8f84bf.tar.xz |
rystamps: equalize tabs in reports
Diffstat (limited to 'rystamps.py')
-rwxr-xr-x | rystamps.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/rystamps.py b/rystamps.py index 934f570..16b381e 100755 --- a/rystamps.py +++ b/rystamps.py @@ -77,8 +77,9 @@ def main(): except OSError: continue if timecomp(int(mtime), servers[s][ival]) == True: - alarms.append("%s %s.1\t last modified on: %s (UTC)" % ( - s, ival, datetime.fromtimestamp(int(mtime)))) + tab = "\t" if len("%s %s.1" % (s, ival)) > 15 else "\t\t" + alarms.append("%s %s.1%s last modified on: %s (UTC)" % ( + s, ival, tab, datetime.fromtimestamp(int(mtime)))) if alarms: body = "Outdated backups detected:\n\n%s" % "\n".join(alarms) |