From aad4e8cc8a04f46fee6f026897dbfcb8bc8f84bf Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Mon, 30 May 2011 00:22:54 +0200 Subject: rystamps: equalize tabs in reports --- rystamps.py | 5 +++-- 1 file 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) -- cgit v1.2.3