Skip to content
Snippets Groups Projects
Commit fc0c3717 authored by Steven Murray's avatar Steven Murray
Browse files

ctafstgcd.py no longer logs an ERROR when it fails to stat() a file that has...

ctafstgcd.py no longer logs an ERROR when it fails to stat() a file that has been deleted by the FST
parent 78353bb6
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@ import argparse
import ConfigParser
import datetime
import distutils
import errno
import getpass
import logging
import logging.config
......@@ -66,7 +67,11 @@ class RealDisk:
return filesizeandctime
except Exception as err:
raise Exception("Failed to stat file: path={}: {}".format(path, err))
# The file may have been deleted by the FST just before the stat
if err.errno == errno.ENOENT:
return None
else:
raise Exception("Failed to stat file: path={}: {}".format(path, err))
def getfreebytes(self, path):
statvfs = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment