From f8c735d7255e6cbb31930c31dda7282883912908 Mon Sep 17 00:00:00 2001 From: "Adrian C. (anrxc)" Date: Sun, 1 May 2011 02:24:16 +0200 Subject: rystamps: missing snapshots shouldn't break the checks --- rystamps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rystamps.py b/rystamps.py index 9cc8429..934f570 100755 --- a/rystamps.py +++ b/rystamps.py @@ -72,8 +72,10 @@ def main(): for s in servers.keys(): for ival in servers[s].keys(): - mtime = getmtime("%s/%s/%s.1" % (backups, s, ival)) - + try: + mtime = getmtime("%s/%s/%s.1" % (backups, s, ival)) + 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)))) -- cgit v1.2.3