diff options
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) |