From: stack Date: Tue, 29 Jan 2013 01:55:13 +0000 (+0100) Subject: added counter X-Git-Url: https://v.licheni.net/stack/code/idfimage.git/commitdiff_plain/HEAD?hp=673b7097376c600a927e00b397032c711a7348de added counter --- diff --git a/idfimage.py b/idfimage.py index 88436e8..bbe52e2 100755 --- a/idfimage.py +++ b/idfimage.py @@ -52,10 +52,12 @@ if __name__ == "__main__": debug = 1 if len(sys.argv) == 4 and sys.argv[3] == "-v" else None + nfiles = 0 for fpath in getfiles(sys.argv[1]): verbose("Checking: " + fpath) + nfiles += 1 if not checkfimage(fpath): log(fpath, fdlog) verbose("ERR not an image: " + fpath) - fdlog.close() + print ("Checked %d files."% nfiles)