summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian C. (anrxc) <anrxc@sysphere.org>2011-05-29 22:22:54 (GMT)
committerAdrian C. (anrxc) <anrxc@sysphere.org>2011-05-29 22:23:52 (GMT)
commitaad4e8cc8a04f46fee6f026897dbfcb8bc8f84bf (patch)
tree391e754347d026ec798c3476edc03087341af1f1
parentf8c735d7255e6cbb31930c31dda7282883912908 (diff)
downloadrybackup-aad4e8cc8a04f46fee6f026897dbfcb8bc8f84bf.tar.xz
rystamps: equalize tabs in reports
-rwxr-xr-xrystamps.py5
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)